-
Notifications
You must be signed in to change notification settings - Fork 867
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
fix:(controller) leader election bug #2280
Conversation
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Codecov ReportBase: 82.38% // Head: 82.37% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2280 +/- ##
==========================================
- Coverage 82.38% 82.37% -0.02%
==========================================
Files 121 121
Lines 18476 18471 -5
==========================================
- Hits 15221 15215 -6
- Misses 2468 2471 +3
+ Partials 787 785 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
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.
Implementation looks good but I think PR should improve the test coverage preferably in form of unit tests and/or integration tests if possible.
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
…to fix-leader-election-bug
Signed-off-by: zachaller <[email protected]>
Added one more test to just close/exit on a single instance setup to cover the log lines. It's currently from my understanding impossible to cover the actual shutdown of a controller because go test framework has no way to capture exit codes from the test process. I like the idea of switching the e2e tests to using HA, in order to do that though will require a bit of work including creating a HA manifest that we can use to deploy for e2e then have a test that somehow kills one of the controllers (not sure how) and looks for a switch but not sure how all that would work it would be quite complicated because I am not sure how we would be able to tell that the standby controller took over and we didn't just spin up a new instance. |
I will also point out that all the other lines except the OnStopLeading callback where also never tested before this they just got flagged due to rename not that that is good but you can see that here https://github.com/argoproj/argo-rollouts/pull/2282/files where I just undid the rename. |
Signed-off-by: zachaller <[email protected]>
Signed-off-by: zachaller <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
closing in favor of #2291 |
Fixes #2117
This change has a behavior change in that we now always spin up metrics server even on children they just have zero values because they are not processing anything.