-
Notifications
You must be signed in to change notification settings - Fork 21
fix: bug fixes in rollout controller and work-generator #379
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -673,6 +673,13 @@ func (r *Reconciler) syncApplyStrategy( | |
|
|
||
| // areAllWorkSynced checks if all the works are synced with the resource binding. | ||
| func areAllWorkSynced(existingWorks map[string]*fleetv1beta1.Work, resourceBinding fleetv1beta1.BindingObj, _, _ string) bool { | ||
| // If there is no existing work, they are not synced. | ||
| // Even for the case where the resource snapshot has no selected resources, | ||
| // there should be one work created for the empty resource list. | ||
| if len(existingWorks) == 0 { | ||
| return false | ||
| } | ||
|
Comment on lines
+677
to
+681
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like this function is only called when the resource snapshot is missing.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, we only create an empty work for eveloped cases. I was thinking of removing it
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yeah, it's possible when rollout controller updates the binding using the resourceSnapshot while it is deleted when work-generator queries this snapshot.
I validated it in my fleet. yeah, we was thinking of removing this behavior few times, but we have to specially handle this case in multiple controllers. prefer to keep it internally. The original complains was that it's not obvious from the CRP condition when selecting nothing. We can improve the external user experience/messages separately. |
||
|
|
||
| // TODO: check resourceOverrideSnapshotHash and clusterResourceOverrideSnapshotHash after all the work has the ParentResourceOverrideSnapshotHashAnnotation and ParentClusterResourceOverrideSnapshotHashAnnotation | ||
| resourceSnapshotName := resourceBinding.GetBindingSpec().ResourceSnapshotName | ||
| for _, work := range existingWorks { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
this actually fixed the unexpected bug which was caused by an uncached read failure but we thought it was from cache.