-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass context to WaitReady of alertmanager Peer interface. #3931
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Waiting for prometheus/alertmanager#2509 to get merged before marking this PR with an official approval. I've asked @gouthamve to review prometheus/alertmanager#2509.
@@ -584,8 +584,13 @@ func (p *Peer) Ready() bool { | |||
} | |||
|
|||
// Wait until Settle() has finished. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn’t WaitReady
return error
, so that client knows whether peer is now ready or not? WDYT?
883a71f
to
e620254
Compare
pkg/alertmanager/alertmanager.go
Outdated
@@ -110,7 +110,7 @@ func init() { | |||
type State interface { | |||
AddState(string, cluster.State, prometheus.Registerer) cluster.ClusterChannel | |||
Position() int | |||
WaitReady() | |||
WaitReady(context.Context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WaitReady(context.Context) | |
WaitReady(context.Context) error |
e620254
to
4cf1ead
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
4cf1ead
to
8769704
Compare
Rebase |
Signed-off-by: Steve Simpson <steve.simpson@grafana.com>
Signed-off-by: Steve Simpson <steve.simpson@grafana.com>
8769704
to
9d318af
Compare
Fixed mod-check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
…ect#3931) * Update alertmanager. Signed-off-by: Steve Simpson <steve.simpson@grafana.com> * Pass context to WaitReady of alertmanager Peer interface. Signed-off-by: Steve Simpson <steve.simpson@grafana.com>
What this PR does:
Pass context to WaitReady of alertmanager Peer interface.
Original discussion:
#3839 (comment)
Depends on: prometheus/alertmanager#2509
Checklist
- [X] Tests updated- [X] Documentation added- [X]CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]