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

feat: Ignore preserveUnknownFields in Diff from CRD Spec #6503

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

subbuv26
Copy link
Contributor

@subbuv26 subbuv26 commented Jun 18, 2021

Signed-off-by: Subba Reddy Veeramreddy subbareddyv.uoh@gmail.com

Fixes #6401
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:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@@ -550,12 +550,14 @@ func (mgr *SettingsManager) GetResourceOverrides() (map[string]v1alpha1.Resource
}

crdGK := "apiextensions.k8s.io/CustomResourceDefinition"
crdPrsvUnkn := "/spec/preserveUnknownFields"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it be good if these parameters declared as constants along with "status"

Signed-off-by: Subba Reddy Veeramreddy <subbareddyv.uoh@gmail.com>
@codecov
Copy link

codecov bot commented Jun 21, 2021

Codecov Report

Merging #6503 (20af75c) into master (2541fa0) will increase coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6503      +/-   ##
==========================================
+ Coverage   41.11%   41.12%   +0.01%     
==========================================
  Files         153      153              
  Lines       20304    20313       +9     
==========================================
+ Hits         8348     8354       +6     
- Misses      10798    10800       +2     
- Partials     1158     1159       +1     
Impacted Files Coverage Δ
util/settings/settings.go 47.00% <66.66%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2541fa0...20af75c. Read the comment docs.

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM.

I agree with your suggestions in the comments as well.

@alexmt alexmt merged commit 7f5c014 into argoproj:master Jun 22, 2021
@jannfis jannfis added the needs-verification PR requires pre-release verification label Jun 25, 2021
@yogeek
Copy link

yogeek commented Jul 2, 2021

Hello :) thanks for this improvement. Is it meant to be included in the 2.0.4 release or the next one please ?

@yogeek
Copy link

yogeek commented Jul 6, 2021

Follow-up to the previous question :
I had a OutOfSync on a repo containing CRDs (argocd version 2.0.4 ) due to preserveUnknownFields
I saw that it was fixed in this PR merged on master.
So I updated my argocd deployment to point to latest docker image but I still have the OutOfSync error ... did I miss something please ?
@alexmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-verification PR requires pre-release verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRDs having preserveUnknownFields: False causing argo-cd out of sync
4 participants