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(cli): add flags to admin import for retrying updates on conflicts and skipping resources with specific labels. #21694

Merged
merged 23 commits into from
Feb 4, 2025

Conversation

ashutosh16
Copy link
Contributor

@ashutosh16 ashutosh16 commented Jan 28, 2025

  • argocd admin import fails occasionally due to resourceVersion mismatch
  • add flags
    • --override-on-conflict // when flag is added the resource will be forcefully updated.
    • --skip-resources-with-label //skip certain resources based on the labels
      --skip-resources-with-label my-label/example.io=true
      

@ashutosh16 ashutosh16 requested a review from a team as a code owner January 28, 2025 17:48
Copy link

bunnyshell bot commented Jan 28, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@ashutosh16 ashutosh16 requested a review from a team as a code owner January 28, 2025 18:27
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
@ashutosh16 ashutosh16 force-pushed the argo-cd-import branch 3 times, most recently from e9025ca to 9b766ea Compare January 30, 2025 17:18
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 27.27273% with 24 lines in your changes missing coverage. Please review.

Project coverage is 53.71%. Comparing base (1698370) to head (ef0fdea).
Report is 29 commits behind head on master.

Files with missing lines Patch % Lines
cmd/argocd/commands/admin/backup.go 27.27% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21694      +/-   ##
==========================================
- Coverage   55.41%   53.71%   -1.71%     
==========================================
  Files         339      339              
  Lines       57200    56836     -364     
==========================================
- Hits        31700    30528    -1172     
- Misses      22829    23699     +870     
+ Partials     2671     2609      -62     

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

Copy link
Member

@agaudreault agaudreault left a comment

Choose a reason for hiding this comment

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

Lgtm. Few nitpicks and if you could update the PR description to reflect the changes that would be awesome

cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
@ashutosh16 ashutosh16 changed the title fix(admin cli): add flags to skip certain resources and retry resource on conflict during the import process. fix(cli): add flags to admin import for retrying updates on conflicts and skipping resources with specific labels. Jan 31, 2025
@ashutosh16 ashutosh16 enabled auto-merge (squash) January 31, 2025 17:44
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
@ashutosh16 ashutosh16 force-pushed the argo-cd-import branch 2 times, most recently from c12faf6 to 5210a54 Compare February 3, 2025 17:12
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
cmd/argocd/commands/admin/backup.go Outdated Show resolved Hide resolved
asingh51 and others added 20 commits February 3, 2025 12:58
Signed-off-by: asingh51 <[email protected]>

fix: resource update when conflict

Signed-off-by: asingh51 <[email protected]>

fix: resource update when conflict

Signed-off-by: asingh51 <[email protected]>

fix: resource update when conflict

Signed-off-by: asingh51 <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Ashu <[email protected]>
Signed-off-by: asingh51 <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Ashu <[email protected]>
Signed-off-by: asingh51 <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Ashu <[email protected]>
Signed-off-by: asingh51 <[email protected]>
@ashutosh16 ashutosh16 merged commit 99cd3c7 into argoproj:master Feb 4, 2025
26 checks passed
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.

3 participants