Fix state reconciliation early return on unchanged DaemonSet#2062
Open
Mirza-Samad-Ahmed-Baig wants to merge 1 commit intoNVIDIA:mainfrom
Open
Fix state reconciliation early return on unchanged DaemonSet#2062Mirza-Samad-Ahmed-Baig wants to merge 1 commit intoNVIDIA:mainfrom
Mirza-Samad-Ahmed-Baig wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
Signed-off-by: Mirza-Samad-Ahmed-Baig <Mirzasamadahmedbaig@gmail.com>
f3f4d0c to
d3ce837
Compare
Contributor
|
/ok-to-test d3ce837 |
| err := stateSkel.createOrUpdateObjs(ctx, func(_ *unstructured.Unstructured) error { return nil }, []*unstructured.Unstructured{ds, cm}) | ||
| require.NoError(t, err) | ||
|
|
||
| gotCm := &unstructured.Unstructured{} |
Contributor
There was a problem hiding this comment.
Can we also simulate a case where a ConfigMap exists and an update happens to it successfully (while the DaemonSet remains unchanged)?
Contributor
|
This is kind of ok as its not really a bug. When nvidiaDriver is changed, hash for every daemonset owned by it changes. There isn't any case as of today where nvidiadriver manages multiple daemonsets and hash of only one daemonset changes. So returning early is kind of ok. But yeah, if others think we can just evaluate all than returning early, then that is fine as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixed a critical reconciliation bug where stateSkel.createOrUpdateObjs would return nil (exiting early) when a DaemonSet’s hash was unchanged, potentially skipping reconciliation of later objects; now it continues.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
Added a regression unit test that fails on the old behavior and passes with the fix .