Fix CloudProfile API rejection by skipping invalid SemVer legacy tags#34
Fix CloudProfile API rejection by skipping invalid SemVer legacy tags#34anton-paulovich wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthrough
ChangesSemVer validation in ImageUpdater
ironcore-metal CloudProfile manifest
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
With the recent GEP-33 updates,
cloud-profile-syncwas made smarter: it now correctly extracts a valid, clean semantic version (e.g.,1877.9.2) from OCI image annotations. Because this clean version passes the initialfilterImages()validation, images with historically malformed, non-SemVer compliant raw tags (e.g.,1877.9.2.0-metal-sci-pxe-amd64-...) are now successfully processed by the controllerHowever, when it attempts to write these raw tags back into the legacy
spec.machineImages[].versions[].versionarray for backward compatibility, the Gardener API Server strictly enforces SemVer validation. This caused the API server to reject the entire CloudProfile patch as Invalid, silently halting the synchronization processHow it works now with feature flag enabled:
Invalid SemVer Tag + Has CleanVersion: NEW format only.
Valid SemVer Tag + Has CleanVersion: BOTH formats (the ideal transition state).
Valid SemVer Tag + NO/Invalid CleanVersion (Old images): OLD format only.