-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: implement OpenStream func of OSS artifactdriver. Part of #8489 #12908
Conversation
Co-authored-by: AlbeeSo <suyashi1321@163.com> Co-authored-by: shuangkun <tsk2013uestc@163.com> Signed-off-by: AlbeeSo <suyashi1321@163.com>
Could you add some info in doc: |
Maybe can add it after it is released. |
return false, origErr | ||
} | ||
// directory case: | ||
// todo: make a .tgz file which can be streamed to user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we implement this in the same PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that OSS SDK (or S3 also) does not currently support operations like "GetObjectsWithPrefix" to a .tgz file. So the only way might be to list objects with prefix first, load, tar them then and stream the .tgz file to user finally, more like a "LoadToStream" way.
https://github.com/argoproj/argo-workflows/blob/34967127bfe304da0f72dc1dba63558a1609b2d0/server/artifacts/artifact_server.go#L184C1-L233C36
Maybe it would be better to still return an html page?
Can you test if a relatively large artifact can be viewed successfully as well? |
I tested with workflow: apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-
spec:
entrypoint: main
templates:
- name: main
container:
image: alpine:latest
command:
- sh
- -c
args:
- |
mkdir -p /out
dd if=/dev/random of=/out/testfile.txt bs=20M count=1024
echo "Download!"
outputs:
artifacts:
- name: out
path: /out/testfile.txt
oss:
endpoint: http://oss-cn-zhangjiakou-internal.aliyuncs.com
bucket: bucket
key: argo-workflows/test/bigfile
accessKeySecret:
name: my-argo-workflow-credentials
key: accessKey
secretKeySecret:
name: my-argo-workflow-credentials
key: secretKey to download a 20GB output file from UI successfully. |
Sorry Im little bit confused about the support version, is it v3.5+? |
No need to add it now. Please add it when a new version is released. |
you can change title reference #11823 |
We should try to get docs in ASAP with features, ideally within the same PR. The longer we wait the more likely that something is either undocumented or documented incorrectly.
It would be v3.6+. We have versioned documentation now (#11390) and already have various docs for new features coming to v3.6 with appropriate version specifiers (#12581) |
Part of #8489
Motivation
OSS Artifact Driver do not support OpenStream Func to avoid unnecessary file downloading.
Modifications
Implemented OpenStream Func of OSS Artifact Driver.
Verification
Get an artifact which storages in OSS from UI, check the logs of argo-server.
latest version:
submitted version: