-
Notifications
You must be signed in to change notification settings - Fork 24
updating ImageRebuildTriggerGeneration in module status #1756
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 |
|---|---|---|
|
|
@@ -547,6 +547,13 @@ func (mrh *moduleReconcilerHelper) moduleUpdateWorkerPodsStatus(ctx context.Cont | |
| mod.Status.ModuleLoader.DesiredNumber = int32(len(nmcs)) | ||
| mod.Status.ModuleLoader.AvailableNumber = int32(numAvailable) | ||
|
|
||
| micObj, err := mrh.micAPI.Get(ctx, mod.Name, mod.Namespace) | ||
| if err != nil { | ||
| logger.Info("Could not get MIC to update ImageRebuildTriggerGeneration status, skipping", "error", err) | ||
| } else { | ||
| mod.Status.ImageRebuildTriggerGeneration = micObj.Status.ImageRebuildTriggerGeneration | ||
| } | ||
|
Comment on lines
+550
to
+555
Member
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. Why are we doing it inside of I would create a new helper method called I know this is what we did u/s and I am OK merging this PR as is but I think we should fix it u/s and then pull this change m/s as well.
Member
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. I agree, I think also we should rename this function since its not updating worker pod status, maybe something like
Member
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. Thanks. I will comment on the u/s PR. |
||
|
|
||
| return mrh.client.Status().Patch(ctx, mod, client.MergeFrom(unmodifiedMod)) | ||
| } | ||
|
|
||
|
|
||
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.
Handle MIC read failures explicitly to avoid stale Module status.
At Line [551], all MIC
Geterrors are ignored, somod.Status.ImageRebuildTriggerGenerationcan remain stale and diverge from MIC indefinitely. Prefer: clear on NotFound, but return error for transient failures so reconcile retries.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents