Reconcile loop bug that fetches images several times per second - #50
Merged
anton-paulovich merged 7 commits intoSep 3, 2026
Merged
anton-paulovich merged 7 commits into
anton-paulovich merged 7 commits into
Conversation
Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
…_source Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
…ration Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
Signed-off-by: C5421281 <yahor.kurachkin@sap.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes directly address common sources of reconcile churn (no-op status patches, unstable ordering, and unstable expiration timestamps) and include targeted test coverage for the new Glance expiration behavior.
Pull request overview
Fixes a tight reconcile loop that was repeatedly re-fetching machine images by reducing no-op status patches and stabilizing CloudProfile updates (both provider config ordering and deprecated-image expiration date handling).
Changes:
- Skip status subresource patching when
ManagedCloudProfile.Statusis unchanged, and only reconcile MCP updates on generation changes. - Preserve previously-written expiration dates for deprecated machine image versions when regenerating
CloudProfile.Spec. - Stabilize OpenStack ProviderConfig region ordering and ensure Glance’s deprecated version gets an expiration date; adjust updater/tests accordingly.
File summaries
| File | Description |
|---|---|
| controllers/managedcloudprofile_controller.go | Avoid no-op status patches and reduce reconcile triggers to generation changes for MCP objects. |
| controllers/cloud_profile.go | Preserve deprecated image expiration dates across reconciles to prevent CloudProfile churn. |
| cloudprofilesync/ossync/source/glance/os_source.go | Stamp an expiration date on the deprecated (oldest) version when missing. |
| cloudprofilesync/ossync/source/glance/os_source_test.go | Adds coverage that deprecated Glance version receives an expiration date and supported does not. |
| cloudprofilesync/ossync/provider/openstack/provider.go | Sort region mappings to make ProviderConfig JSON stable across reconciles. |
| cloudprofilesync/ossync/os_image_updater.go | Simplifies expiration resolution to prefer existing values; avoids stamping new dates in updater paths. |
| cloudprofilesync/ossync/os_image_updater_test.go | Removes the updater “stamp expiration when missing” test to match new behavior. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
adziauho
approved these changes
Sep 3, 2026
anton-paulovich
approved these changes
Sep 3, 2026
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.
This PR fixes a reconcile loop bug that fetches images several times per second instead of one time per 5 minute
Changes: