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
Always emit the stopped leading event #111652
Always emit the stopped leading event #111652
Conversation
/assign @jiahuif |
/assign @mikedanese |
staging/src/k8s.io/client-go/tools/leaderelection/leaderelection.go
Outdated
Show resolved
Hide resolved
8557240
to
a67bcd9
Compare
ping @aojea :) I really want to get this merged, it has missed a few releases already. |
can you add an unit test to assert this behavior? |
a67bcd9
to
33da2c6
Compare
/retest |
@aojea Tests added. |
ping @aojea |
staging/src/k8s.io/client-go/tools/leaderelection/leaderelection_test.go
Outdated
Show resolved
Hide resolved
LGTM label has been added. Git tree hash: b0387c150cfd78b09a257ac13b51edba0b94190c
|
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.
One small comment, but overall thanks for fixing it!
staging/src/k8s.io/client-go/tools/leaderelection/leaderelection_test.go
Outdated
Show resolved
Hide resolved
33da2c6
to
771ab74
Compare
/lgtm Thanks! |
LGTM label has been added. Git tree hash: 0585de64cdf55c2f47f8bc3ab6dddc220542c72d
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ash2k, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
What type of PR is this?
/kind feature
/sig api-machinery
What this PR does / why we need it:
Currently my program emits only the
became leader
events and neverstopped leading
:I think it'd be good to also always emit the
stopped leading
event when program cleanly stops and aborts the leader elector (via context).Does this PR introduce a user-facing change?