Open Anton-Sagurov opened 10 months ago
This makes workflow working as it's Key-Only-Artifacts, while in fact - the S3 bucket is specified.
@Anton-Sagurov
I think if you add the endpoint
, it works ok.
s3:
endpoint: s3.amazonaws.com
bucket: argo-workflows-1111111111-eu-central-1
key: ansible/fetch-logs/latest/ansible.zip
@agilgur5
We ran into this same issue, what was posted above was the solution. It was not trivial to understand that the missing endpoint was the cause for the unexpected bucket.
I can think of two options for addressing this issue:
I believe a combination of the two is the better outcome, some clear docs on how to handle s3 artifacts including troubleshooting the different endpoint/bucket problem above. And, if there's a default for the endpoint in the configmap, allowing the bucket to be changed without specifying the endpoint.
although for inputs not archive logs this is similar to https://github.com/argoproj/argo-workflows/issues/12727 in that the configmap is taking precedence
Pre-requisites
:latest
What happened/what did you expect to happen?
We are using
ClusterWorkflowTemplate
to download artifacts form S3 bucket, unzip and prepare for usage by another workflows. The S3 bucket where we store artifacts that we want to consume not the same that we use to store the logs and output artifacts of the workflows:artifactRepositoryRef.configmap
:time="2024-01-23T06:15:41.916Z" level=info msg="Getting file from s3" bucket=argo-workflows-222222222222-eu-central-1 endpoint=s3.amazonaws.com key=ansible/fetch-logs/latest/ansible.zip path=/argo/inputs/artifacts/archive.tmp
❯ kb logs -f -n wkf-support fetch-artifact-24g99 -c init time="2024-01-23T06:15:41.733Z" level=info msg="Starting Workflow Executor" version=v3.5.3 time="2024-01-23T06:15:41.744Z" level=info msg="Using executor retry strategy" Duration=1s Factor=1.6 Jitter=0.5 Steps=5 time="2024-01-23T06:15:41.744Z" level=info msg="Executor initialized" deadline="0001-01-01 00:00:00 +0000 UTC" includeScriptOutput=false namespace=wkf-support podName=fetch-artifact-24g99 templateName=main version="&Version{Version:v3.5.3,BuildDate:2024-01-11T02:24:40Z,GitCommit:0fdf74511d4671cf0c8c334aa2d90ecd61c5acce,GitTag:v3.5.3,GitTreeState:clean,GoVersion:go1.21.6,Compiler:gc,Platform:linux/amd64,}" time="2024-01-23T06:15:41.822Z" level=info msg="Loading script source to /argo/staging/script" time="2024-01-23T06:15:41.822Z" level=info msg="Start loading input artifacts..." time="2024-01-23T06:15:41.822Z" level=info msg="Downloading artifact: archive" time="2024-01-23T06:15:41.822Z" level=info msg="S3 Load path: /argo/inputs/artifacts/archive.tmp, key: ansible/fetch-logs/latest/ansible.zip" time="2024-01-23T06:15:41.833Z" level=info msg="Creating minio client using AWS SDK credentials" time="2024-01-23T06:15:41.916Z" level=info msg="Getting file from s3" bucket=argo-workflows-222222222222-eu-central-1 endpoint=s3.amazonaws.com key=ansible/fetch-logs/latest/ansible.zip path=/argo/inputs/artifacts/archive.tmp ---------START-HTTP--------- HEAD /ansible/fetch-logs/latest/ansible.zip HTTP/1.1 Host: argo-workflows-734708892259-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com User-Agent: MinIO (linux; amd64) minio-go/v7.0.65 Authorization: AWS4-HMAC-SHA256 Credential=REDACTED/20240123/eu-central-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=REDACTED X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20240123T061541Z X-Amz-Security-Token: IQoJb3JpZ2luX2VjeJ7//////////wEaDGV1LWNlbnRyYWwtMSJHMEUCIQCp8rJEqxAhtFjiHq9WAEAHgaMDvOjQg9J4MWPMbPJbKwIgKE1RGQe6I2BIbOx3vMm6kXrtbSIys+1KdH8YM9sWxDYqiAUIVxAEGgw3MzQ3MDg4OTIyNTkiDA19GzRV2KS7TLhbIyrlBErIKNJd/HrJH8Gc8O7ZHKZ9GRrgSM1+tT+JM1flX8VSsY5vnqqxkJEpcVNwzi7qtCDDrJLMFqrb5E/mS3Re8lwieSr1Z1b8yq2N9dr2onMhvKX2JPF/AZvgrOthoIbEgmFN9v/UUgYkfqQp+nN7ZAzEdz43bRTaybLFYZiWiep/Eo2YB5mtujRjCN6mNmMCwHMMfYDLWBk5qaxcd+fOjCaUVFZSskYvFkdW1nOujweyibzRNd4hWzIa4o3fbRgjC6zF9j7SRRT0mK5RbGEZKJ1mdAaMWkTjrBB/nrxzF9jbQJ8T5wtSvp6LVJTNL54juTbAe4FKLvc5VtsldAGcAGALvCwXX9XB0ie+Ovg1h/DmbH/ZIFYR37OeDTB/Q1GyBp9Mt1vLwRluNSkIOaCUAwR9jT8gRhSPiMpKqaIkij+F1pMn4pof41iBBVDdHvctOSHsEe5r/+zZCy6Mwu0D7fJHSDehmdhP9SI/k2ePogbSYcsbjiz7o5U7Y6GTA0ygzo0C+9t+hudzdJgjx4p2jJg6Y6Drk6+qKLkvD67YCylBbFLxir3IivnpwOWUmDzrE+nzSaqEsDTqNmhw9SR87H8/Q1wC4E3qKHwDeQlDMzyqacWxlQBL9Z2Ag8tYcazr0MnRV3B0QNloUNlPPIO2Xqe7B455df3RlmwK+4y85dbEvVNW2kfJF+XFkgC1Yr0DUvYI7vo1lxDtPyRryAa/bdmFGdgFp8BS0wJKnnbACU4+CB5K0SPghvXAfgRIkx8Esjxe6rrpWNDikW/r+Q0FsUaPJZwH39sA407852OKZRAscVvW3AYwjbO9rQY6mwF6kq3sJWXMMD1Sh3b5qV9a6Hi3ggKVlt4ISIwDp19OqSpxkVqXSLgaHXUnYHTVBI9pffvIq6CcKj1gl9mDqH0zU5z0I6pX6WCe1onIEghUaShSJk2QA6AMg4naDWxY7q/Ui1eT0VZ0/A/+8FIDtyCJPbYGVsIx/0zAs5h/brZtaxWeutGoquhe4OA+jz/wJvo9U3Qj7AWQXmDbeg==
HTTP/1.1 403 Forbidden Connection: close Content-Type: application/xml Date: Tue, 23 Jan 2024 06:15:41 GMT Server: AmazonS3 X-Amz-Id-2: nmBVncP50yChVfULmLa+zfl3yno5PouUeWKsdeM8oeL9n5PnVJruvfemHhMPuZi6QqME+rpitKQ= X-Amz-Request-Id: Z828D6DHZAKZKPDS ---------END-HTTP--------- time="2024-01-23T06:15:41.964Z" level=warning msg="Non-transient error: Access Denied." time="2024-01-23T06:15:41.964Z" level=info msg="Load artifact" artifactName=archive duration=142.248041ms error="failed to get file: Access Denied." key=ansible/fetch-logs/latest/ansible.zip time="2024-01-23T06:15:41.965Z" level=error msg="executor error: artifact archive failed to load: failed to get file: Access Denied." time="2024-01-23T06:15:41.965Z" level=info msg="Alloc=11272 TotalAlloc=16628 Sys=23397 NumGC=4 Goroutines=8"
Logs from the workflow controller
Logs from in your workflow's wait container