-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(appset): ignoreApplicationDifferences not working #15965
fix(appset): ignoreApplicationDifferences not working #15965
Conversation
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #15965 +/- ##
=======================================
Coverage 49.55% 49.55%
=======================================
Files 269 269
Lines 46852 46891 +39
=======================================
+ Hits 23216 23236 +20
- Misses 21357 21374 +17
- Partials 2279 2281 +2
☔ View full report in Codecov by Sentry. |
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
docs/operator-manual/applicationset/Controlling-Resource-Modification.md
Outdated
Show resolved
Hide resolved
…ication.md Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
tested this from a slack thread and its now working as expected for switching branches |
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.
Thanks @crenshaw-dev. Tested the feature locally and overall code changes look good!
Signed-off-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
do we have an ETA on when this fix will be released? thank you for the quick turnaround |
@zhammer 2.9 was released yesterday |
@mzupan might be missing something simple, but looking at the commits for the v2.9.0 tag, this fix is missing v2.9.0...master |
@zhammer it's there/. you just need to click the load more commits button a few times.. |
@mzupan ah, my fault, thank you. |
@mzupan @crenshaw-dev hey guys, it looks like this feature is in the master branch but not in the 2.9.0 tag, am I missing something here? 2.9.0 master EDIT: I've been trying to use this feature using |
/cherry-pick release-2.9 |
Cherry-pick failed with |
I don't see it in v2.9.0 either. Thanks for pointing that out. Let me cherry-pick for 2.9.1 |
ah thank you! |
/cherry-pick release-2.9 |
Cherry-pick failed with |
As cherry-pick bot is failing, created PR #16299 for cherry-picking the changes to 2.9.1 |
* fix(appset): ignoreApplicationDifferences not working Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * tests, docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * link to enhancement request Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * handle error Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix bug, fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * normalize empty syncPolicy field Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
* fix(appset): ignoreApplicationDifferences not working * tests, docs * link to enhancement request * handle error * Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md * fix bug, fix docs * fix docs * normalize empty syncPolicy field --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com>
When will 2.9.1 release? |
@vl-kp a couple hours ago! |
* fix(appset): ignoreApplicationDifferences not working Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * tests, docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * link to enhancement request Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * handle error Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix bug, fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * normalize empty syncPolicy field Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com>
* fix(appset): ignoreApplicationDifferences not working Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * tests, docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * link to enhancement request Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * handle error Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix bug, fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * normalize empty syncPolicy field Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com>
* fix(appset): ignoreApplicationDifferences not working Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * tests, docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * link to enhancement request Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * handle error Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix bug, fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * normalize empty syncPolicy field Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Kevin Lyda <kevin@lyda.ie>
* fix(appset): ignoreApplicationDifferences not working Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * tests, docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * link to enhancement request Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * handle error Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update docs/operator-manual/applicationset/Controlling-Resource-Modification.md Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix bug, fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * normalize empty syncPolicy field Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Hugues Peccatte <hugues.peccatte@gmail.com>
The original implementation failed to normalize both the live and the generated state, so the applied patch could contain fields which should have been ignored.
I did some refactoring here, but I think it was all necessary in order to properly normalize both manifests before calculating the patch.
🤖 Generated by Copilot at 7db7cc4
This pull request refactors and enhances the ApplicationSet controller and utils package to support ignoring differences between live and desired state of Application resources, and to log the patches that are applied. It also updates the documentation and adds unit tests for the new features.