fix: handle apiGroup updates in resource-tracking#11012
Merged
crenshaw-dev merged 7 commits intoargoproj:masterfrom Nov 3, 2022
Merged
fix: handle apiGroup updates in resource-tracking#11012crenshaw-dev merged 7 commits intoargoproj:masterfrom
crenshaw-dev merged 7 commits intoargoproj:masterfrom
Conversation
Closed
3 tasks
6e20a06 to
b95c221
Compare
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
b95c221 to
d72707b
Compare
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Codecov ReportBase: 45.60% // Head: 45.61% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #11012 +/- ##
==========================================
+ Coverage 45.60% 45.61% +0.01%
==========================================
Files 237 237
Lines 28914 28920 +6
==========================================
+ Hits 13185 13191 +6
Misses 13913 13913
Partials 1816 1816
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Member
|
@leoluz how far back should this be cherry-picked? |
Collaborator
Author
@crenshaw-dev I would say 2.4 branch |
crenshaw-dev
approved these changes
Nov 3, 2022
Member
crenshaw-dev
left a comment
There was a problem hiding this comment.
Code looks good! Feel free to take or leave the comment suggestions. 😄
Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
crenshaw-dev
pushed a commit
that referenced
this pull request
Nov 3, 2022
* fix: handle apiGroup updates in resource-tracking Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * Fix test Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * change the fix approach by inspecting tracking id from the config Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * add unit-test to validate the scenario Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * fix test lint Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * review fixes Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * Reword godocs for clarity Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
crenshaw-dev
pushed a commit
that referenced
this pull request
Nov 3, 2022
* fix: handle apiGroup updates in resource-tracking Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * Fix test Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * change the fix approach by inspecting tracking id from the config Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * add unit-test to validate the scenario Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * fix test lint Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * review fixes Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * Reword godocs for clarity Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Member
|
Cherry-picked onto release-2.5 for 2.5.2 and release-2.4 for 2.4.17. |
emirot
pushed a commit
to emirot/argo-cd
that referenced
this pull request
Jan 27, 2023
* fix: handle apiGroup updates in resource-tracking Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * Fix test Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * change the fix approach by inspecting tracking id from the config Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * add unit-test to validate the scenario Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * fix test lint Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * review fixes Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> * Reword godocs for clarity Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com> Signed-off-by: emirot <emirot.nolan@gmail.com>
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.
We noticed a strange behaviour in Argo CD 2.4.11 when users upgrade to a newer APIGroup (e.g. going from
extensions/Ingresstonetworking.k8s.io/Ingress). In this case the resource sync status displays asunknownand Argo CD is unable to manage the resource anymore even if it is present in the source (git).The issue is caused because the trackingId annotation (
argocd.argoproj.io/tracking-id) changes like in the example below:ingress-app:extensions/Ingress:default/some-ingressingress-app:networking.k8s.io/Ingress:default/some-ingressThis is related to the code introduced in #9791 and #10198 while addressing the issue #8683. In this case Argo CD displays the Ingress resource but stops managing it, skipping all future change in the desired state (git).
Maybe #8683 needs to be re-assessed to find a different solution not relying on the APIGroup for comparison.
Another possible fix is stop verifying the APIGroup in
isSelfReferencedObjmethod which would make it simpler and work even when SSA is enabled. However I'd like to get @jannfis or @jessesuen opinion first before going in this direction to make sure #9791 is still covered in this case.Signed-off-by: Leonardo Luz Almeida leonardo_almeida@intuit.com
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: