argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.08k stars 3.2k forks source link

ArtifactGC: Add strategies for "OnWorkflowSuccessOrDeletion" and "OnWorkflowFailureOrDeletion" #9318

Open juliev0 opened 2 years ago

juliev0 commented 2 years ago

Consider giving users the ability to configure their Workflows so artifacts be automatically deleted only in the case of success or failure.

Strategies like "OnWorkflowSuccessOrDeletion" and "OnWorkflowFailureOrDeletion" would make it so that artifacts could also be deleted when the Workflow gets deleted if they weren't already deleted.

Need to determine if we also want to have "OnWorkflowSuccess" and "OnWorkflowFailure" or no need...


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

zamonia500 commented 1 year ago

This enhancement is in progress? I have willing to implement this feature 🤔

juliev0 commented 1 year ago

So, we decided there wasn’t a big need for this. I implemented it and then closed the PR. Do you have a need for it?

zamonia500 commented 1 year ago

Oh, i checked the PR you opened before and saw this comment https://github.com/argoproj/argo-workflows/pull/9354#issuecomment-1216939529 , it seems the idea suggested by comment is more flexible.

juliev0 commented 1 year ago

Yeah, the only thing is that it's a bigger change and carries more risk. Alex wanted to see if there was enough interest before moving forward with it at all. Do you have a need for it or just interested in making contributions to the repo?

zamonia500 commented 1 year ago

Exactly, i needs the functionality that delete artifacts in any cases. And i needs another functionality removes GC finalizer in any cases. For example when ArtifactGC pod failed, it's impossible to delete the workflow because the GC finalizer remains :(

juliev0 commented 1 year ago

I unassigned myself if you want to submit a PR for this.

As far as the second concern, I think there could be an enhancement which enables configuring the Workflow Controller to remove the finalizer if Artifact GC fails. I've considered this in the past. I would be open to working on that.

zamonia500 commented 1 year ago

Okay, our considerations could be divided into two points.

  1. Add strategies field to apply multiple artifactGC strategy.
  2. Enhance Workflow controller to remove ArtifactGC finalizer

How about create new issues for each point?

juliev0 commented 1 year ago

@zamonia500 Sounds good. Do you want to open those?