-
Notifications
You must be signed in to change notification settings - Fork 2
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
reconciler: Fix flake in reconciler tests due to ID being unset #66
Conversation
The fix to JSON status marshalling had the unintended effect that now the reconciler test suite ran with the ID field being uninitialized, leading to the reconciler overwriting the status of a changed object. This resulted in small fraction of the reconciler test runs failing (e.g. object was marked pending, but instead of being re-reconciled the previous status was inserted). This did not affect non-test code as status should always be constructed with StatusPending() etc. Fix this by exporting the ID and filling it in the tests. Fixes: 132edd6 ("reconciler: Fix Status JSON marshalling") Signed-off-by: Jussi Maki <jussi.maki@isovalent.com>
Failure can be seen in https://github.com/cilium/statedb/actions/runs/11707677739/job/32607608514:
Easy to also hit by stressing So yeah, I did actually have a purpose for making the WDYT about solving it this way by just making the |
|
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.
ah, right. Ouch.
The fix to JSON status marshalling had the unintended effect that now the reconciler test suite ran with the ID field being uninitialized, leading to the reconciler overwriting the status of a changed object. This resulted in small fraction of the reconciler test runs failing (e.g. object was marked pending, but instead of being re-reconciled the previous status was inserted).
This did not affect non-test code as status should always be constructed with StatusPending() etc.
Fix this by exporting the ID and filling it in the tests.
Fixes: 132edd6 ("reconciler: Fix Status JSON marshalling")