Skip to content

Conversation

@AlbeeSo
Copy link
Contributor

@AlbeeSo AlbeeSo commented Apr 7, 2024

Fixes #9349

Motivation

return common.ErrDeleteNotSupported

OSS Artifact Driver still NOT support Artifact Garbage Collection as Delete Func has not been implemented.

Modifications

Implemented Delete Func of OSS Artifact Driver .

Verification

Plz check with workflow like

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: artifact-gc-
spec:
  entrypoint: main
  artifactGC:
    strategy: OnWorkflowDeletion # the overall strategy, which can be overridden
    podMetadata:
      annotations:
         kubernetes.io/resource-type: eci
  templates:
    - name: main
      container:
        image: argoproj/argosay:v2
        command:
          - sh
          - -c
        args:
          - |
            echo "hello world" > /tmp/on-completion.txt
            echo "hello world" > /tmp/on-deletion.txt
      outputs:
        artifacts:
          - name: on-completion
            path: /tmp/on-completion.txt
            oss:
              endpoint: http://oss-cn-zhangjiakou-internal.aliyuncs.com
              bucket: my-argo-workflow
              key: on-completion.txt
              accessKeySecret:
                name: my-argo-workflow-credentials
                key: accessKey
              secretKeySecret:
                name: my-argo-workflow-credentials
                key: secretKey
            artifactGC:
              strategy: OnWorkflowCompletion # overriding the default strategy for this artifact
          - name: on-deletion
            path: /tmp/on-deletion.txt
            oss:
              endpoint: http://oss-cn-zhangjiakou-internal.aliyuncs.com
              bucket: my-argo-workflow
              key: on-deletion.txt
              accessKeySecret:
                name: my-argo-workflow-credentials
                key: accessKey
              secretKeySecret:
                name: my-argo-workflow-credentials
                key: secretKey

Co-authored-by: AlbeeSo <[email protected]>
Co-authored-by: shuangkun <[email protected]>
Signed-off-by: AlbeeSo <[email protected]>
@shuangkun shuangkun self-assigned this Apr 7, 2024
@shuangkun shuangkun added the area/artifacts S3/GCP/OSS/Git/HDFS etc label Apr 7, 2024
@shuangkun shuangkun requested a review from juliev0 April 7, 2024 04:17
@shuangkun
Copy link
Member

I tested it in my envirment. When workflow completed the on-completion.txt in oss was garbage collected. when workflow deleted the on-deletion.txt in oss was garbage collected. So LGTM.

@terrytangyuan terrytangyuan merged commit 00101c6 into argoproj:main Apr 7, 2024
shuangkun added a commit to shuangkun/argo-workflows that referenced this pull request Dec 12, 2025
OSS garbage collection was implemented in PR argoproj#12907 by AlbeeSo.
This commit updates the documentation to reflect that OSS now
supports garbage collection.

Co-authored-by: AlbeeSo <[email protected]>
Fixes argoproj#9349

Signed-off-by: shuangkun <[email protected]>
shuangkun added a commit to shuangkun/argo-workflows that referenced this pull request Dec 12, 2025
OSS garbage collection was implemented in PR argoproj#12907 by AlbeeSo.
This commit updates the documentation to reflect that OSS now
supports garbage collection.

Co-authored-by: AlbeeSo <[email protected]>
Fixes argoproj#9349

Signed-off-by: shuangkun <[email protected]>
shuangkun added a commit to shuangkun/argo-workflows that referenced this pull request Dec 12, 2025
OSS garbage collection was implemented in PR argoproj#12907 by AlbeeSo.
This commit updates the documentation to reflect that OSS now
supports garbage collection.

Co-authored-by: AlbeeSo <[email protected]>
Fixes argoproj#9349

Signed-off-by: shuangkun <[email protected]>
shuangkun added a commit to shuangkun/argo-workflows that referenced this pull request Dec 12, 2025
OSS garbage collection was implemented in PR argoproj#12907 by AlbeeSo.
This commit updates the documentation to reflect that OSS now
supports garbage collection.

Co-authored-by: AlbeeSo <[email protected]>
Co-authored-by: shuangkun <[email protected]>

Signed-off-by: AlbeeSo <[email protected]>
Fixes argoproj#9349
Signed-off-by: shuangkun <[email protected]>
shuangkun added a commit to shuangkun/argo-workflows that referenced this pull request Dec 12, 2025
OSS garbage collection was implemented in PR argoproj#12907 by AlbeeSo.
This commit updates the documentation to reflect that OSS now
supports garbage collection.

Co-authored-by: AlbeeSo <[email protected]>
Co-authored-by: shuangkun <[email protected]>

Fixes argoproj#9349

Signed-off-by: shuangkun <[email protected]>
shuangkun added a commit to shuangkun/argo-workflows that referenced this pull request Dec 12, 2025
OSS garbage collection was implemented in PR argoproj#12907 by AlbeeSo.
This commit updates the documentation to reflect that OSS now
supports garbage collection.

Co-authored-by: AlbeeSo <[email protected]>
Co-authored-by: shuangkun <[email protected]>
Signed-off-by: shuangkun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/artifacts S3/GCP/OSS/Git/HDFS etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Artifact Garbage Collection for OSS Artifacts

4 participants