-
Notifications
You must be signed in to change notification settings - Fork 338
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: verify generation in record status #706
Conversation
Codecov Report
@@ Coverage Diff @@
## master #706 +/- ##
============================================
+ Coverage 32.36% 100.00% +67.63%
============================================
Files 65 1 -64
Lines 6488 1 -6487
============================================
- Hits 2100 1 -2099
+ Misses 4137 0 -4137
+ Partials 251 0 -251 Continue to review full report at Codecov.
|
Can we add tests? |
@gxthrj Could you add more descriptions on this PR so that we can know the context of it, frankly, I don't know the exact purpose of |
+1 @gxthrj PTAL |
@gxthrj please check the CI error |
The CI has passsed. |
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.
CI passed
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
bug: recordStatus status is overwritten #671 bug: Informer recursively trigger update event #682
How to fix?
Use the generation field under the resource and ObservedGeneration under the status to compare to prevent the status from being recorded repeatedly.
ref: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/customresources-subresources.md#status-behavior