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: prune last #5199

Merged
merged 2 commits into from Jan 6, 2021
Merged

Conversation

mayzhang2000
Copy link
Contributor

fixes: #5080.
If sync option has PruneLast=true, or individual resource has annotation argocd.argoproj.io/sync-options: PruneLast=true, these prune tasks get assigned with a new sync wave.

the new sync wave is the last sync wave of non-prune tasks which is in sync phase + 1, so that these resources will be pruned after all sync phase resources are synced and healthy.

Signed-off-by: May Zhang may_zhang@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:

  • 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 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
  • My build is green (troubleshooting builds).
    fixes: Allow resource pruning to be an implicit final wave of a sync operation #5080.
    If sync option has PruneLast=true, or individual resource has annotation argocd.argoproj.io/sync-options: PruneLast=true, these prune tasks get assigned with a new sync wave.

the new sync wave is the last sync wave of non-prune tasks which is in sync phase + 1, so that these resources will be pruned after all sync phase resources are synced and healthy.

fixes: argoproj#5080.
If sync option has PruneLast=true, or individual resource has annotation argocd.argoproj.io/sync-options: PruneLast=true, these prune tasks get assigned with a new sync wave.

the new sync wave is the last sync wave of non-prune tasks which is in sync phase + 1, so that these resources will be pruned after all sync phase resources are synced and healthy.

Signed-off-by: May Zhang <may_zhang@intuit.com>
@alexmt
Copy link
Collaborator

alexmt commented Jan 6, 2021

Please run go mod tidy so that CI pass

Signed-off-by: May Zhang <may_zhang@intuit.com>
@codecov-io
Copy link

codecov-io commented Jan 6, 2021

Codecov Report

Merging #5199 (5321481) into master (eb9216f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5199   +/-   ##
=======================================
  Coverage   40.68%   40.68%           
=======================================
  Files         136      136           
  Lines       18420    18420           
=======================================
  Hits         7494     7494           
  Misses       9854     9854           
  Partials     1072     1072           
Impacted Files Coverage Δ
controller/sync.go 67.47% <ø> (ø)

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 eb9216f...5321481. Read the comment docs.

@mayzhang2000 mayzhang2000 merged commit f5b9704 into argoproj:master Jan 6, 2021
rbreeze pushed a commit that referenced this pull request Jan 12, 2021
* feat: prune last
fixes: #5080.
If sync option has PruneLast=true, or individual resource has annotation argocd.argoproj.io/sync-options: PruneLast=true, these prune tasks get assigned with a new sync wave.

the new sync wave is the last sync wave of non-prune tasks which is in sync phase + 1, so that these resources will be pruned after all sync phase resources are synced and healthy.

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix: go mod tidy

Signed-off-by: May Zhang <may_zhang@intuit.com>
Signed-off-by: Remington Breeze <remington@breeze.software>
shubhamagarwal19 pushed a commit to shubhamagarwal19/argo-cd that referenced this pull request Apr 15, 2021
* feat: prune last
fixes: argoproj#5080.
If sync option has PruneLast=true, or individual resource has annotation argocd.argoproj.io/sync-options: PruneLast=true, these prune tasks get assigned with a new sync wave.

the new sync wave is the last sync wave of non-prune tasks which is in sync phase + 1, so that these resources will be pruned after all sync phase resources are synced and healthy.

Signed-off-by: May Zhang <may_zhang@intuit.com>

* fix: go mod tidy

Signed-off-by: May Zhang <may_zhang@intuit.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.

Allow resource pruning to be an implicit final wave of a sync operation
3 participants