Skip to content
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): ensure appset don't attempt to remove application kind in patch requests #16056

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Oct 20, 2023

Closes #15900

I was able to reproduce an issue only with the help of a debugger: request fails if patch body contains: "kind": null which happens only if existingObj does not have kind/apiVersion fields and obj has it. I suspect this is happening due to k8s bug: kubernetes/kubernetes#80609 . Sometimes application is take from cache and it has apiVersion/kind and sometimes it is coming from API request without apiVersion/kind.

PR ensures that existingObj has same apiVersion/kind as obj so generated patch won't change apiVersion/kind

…requests

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@alexmt alexmt requested a review from a team as a code owner October 20, 2023 21:10
@crenshaw-dev crenshaw-dev changed the title fix: ensure appset don't attempt to remote application kind in patch requests fix(appset): ensure appset don't attempt to remote application kind in patch requests Oct 20, 2023
Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find. Thanks!

@crenshaw-dev
Copy link
Member

/cherry-pick release-2.9

@crenshaw-dev crenshaw-dev added this to the v2.9 milestone Oct 20, 2023
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (973565e) 49.55% compared to head (6bd1e9c) 49.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16056      +/-   ##
==========================================
- Coverage   49.55%   49.54%   -0.02%     
==========================================
  Files         269      269              
  Lines       46595    46599       +4     
==========================================
- Hits        23091    23088       -3     
- Misses      21232    21238       +6     
- Partials     2272     2273       +1     
Files Coverage Δ
applicationset/utils/createOrUpdate.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crenshaw-dev crenshaw-dev changed the title fix(appset): ensure appset don't attempt to remote application kind in patch requests fix(appset): ensure appset don't attempt to remove application kind in patch requests Oct 23, 2023
@crenshaw-dev crenshaw-dev merged commit 9a922de into argoproj:master Oct 23, 2023
27 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 23, 2023
…requests (#16056)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
crenshaw-dev pushed a commit that referenced this pull request Oct 23, 2023
…requests (#16056) (#16073)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
ymktmk pushed a commit to ymktmk/argo-cd that referenced this pull request Oct 29, 2023
…requests (argoproj#16056)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
jmilic1 pushed a commit to jmilic1/argo-cd that referenced this pull request Nov 13, 2023
…requests (argoproj#16056)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
…requests (argoproj#16056)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…requests (argoproj#16056)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
…requests (argoproj#16056)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppSet degraded on v2.9.0-rc2- "" is invalid: patch: Invalid value
2 participants