-
Notifications
You must be signed in to change notification settings - Fork 85
Add deprecation handling for .Updated template field #931
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
Add deprecation handling for .Updated template field #931
Conversation
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.
@stefanprodan The field .Changed.ImageResult, whose type is the same of .Updated, is not documented: https://fluxcd.io/flux/components/image/imageupdateautomations/#message-template
Is this a mistake we need to fix in this PR, or is this intentional? Should .Changed.ImageResult also be removed?
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.
LGTM
Thanks @cappyzawa 🏅
887803c to
d35a65c
Compare
|
I squashed the commits after receiving approval. |
|
Let's wait for Stefan to comment on the question above, IMO we need to either document or remove it as well. Probably document. |
Yes, also the |
|
@cappyzawa Can you please address this in this PR? |
6b9552f to
13cb7a4
Compare
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.
LGTM! 🚀
Thanks very much once again @cappyzawa, please rebase and squash so we can merge
13cb7a4 to
dd2861d
Compare
|
Sorry can you please rebase once more? I merged your other PR first 😅 |
Implement error handling for deprecated .Updated template field usage in ImageUpdateAutomation commit message templates. When users attempt to use deprecated .Updated fields, the controller now sets a Stalled condition with a clear error message directing them to use .Changed fields instead, preventing infinite reconciliation loops. This prepares for the eventual removal of the .Updated field from the ImageUpdateAutomation API as part of GA preparation. Signed-off-by: cappyzawa <[email protected]>
Remove old Result type and rename ResultV2 to Result, following Stefan's review feedback to eliminate complex nested structures. This creates a single, flat Result type containing only FileChanges for improved API simplicity. Breaking changes: - .Changed.ImageResult.Files/.Images/.Objects no longer available - Users must migrate to .Changed.FileChanges, .Changed.Objects, and .Changed.Changes Enhanced error handling provides specific guidance for removed template fields, setting Stalled condition with clear migration instructions. Updated documentation includes removal notes and migration examples. Signed-off-by: cappyzawa <[email protected]>
dd2861d to
f1a92cb
Compare
|
@matheuscscp Done 🚀 |
Implement fluxcd/flux2#5411 (comment) as part of GA preparation work.
This PR addresses two breaking changes for ImageUpdateAutomation API GA preparation:
Template field
.Updatedremoval (commit d35a65c): The.Updatedtemplate field has been deprecated and removed. Users should migrate to.Changedinstead.Template field
.Changed.ImageResultremoval (commit 9176026): As part of Result/ResultV2 type consolidation, the.Changed.ImageResulttemplate field has been removed. Users should migrate to:.Changed.FileChangesfor detailed change tracking.Changed.Objectsfor object-level changes.Changed.Changesfor a flat list of changesBoth changes include appropriate error handling with migration guidance when deprecated fields are used in templates.