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

[frontend] Artifact API Does not support S3 Regions #8111

Closed
kdubovikov opened this issue Aug 8, 2022 · 6 comments
Closed

[frontend] Artifact API Does not support S3 Regions #8111

kdubovikov opened this issue Aug 8, 2022 · 6 comments
Assignees
Labels
area/frontend kind/bug lifecycle/stale The issue / pull request is stale, any activities remove this label.

Comments

@kdubovikov
Copy link

Screenshot 2022-08-08 at 18 16 17

Screenshot 2022-08-08 at 18 16 02

Artifact fetching API does not seem to support region for s3 resources. If we look here,

return new MinioClient({ ...config, accessKey, secretKey, sessionToken });
, the region parameter is not being passed and it is not a part of the artefact API as well. However, MINIO Client API allows you to specify region when creating a client: https://docs.min.io/docs/javascript-client-api-reference.html. I think API should fetch default region using MINIO_REGION environment variable which should be passed as a part of ml-pipeline-ui-artifact k8s deployment env map.

Environment

Steps to reproduce

  1. Launch any pipeline
  2. Go to Run UI
  3. Try to download any output
  4. Observe the error: Failed to get object in bucket [bucket] at path [path]: S3Error: The authorization header is malformed; the region 'us-east-1' is wrong; expecting '[actual bucket region]'

Expected result

Materials and Reference

@kdubovikov
Copy link
Author

My bad, I've found that it actually uses AWS_REGION variable here:

region: AWS_REGION || 'us-east-1',
. Will add that to deployment to test if it works

@kdubovikov
Copy link
Author

It works as expected if I specify AWS_REGION, AWS_SECRET_ACCESS_KEY, and AWS_ACCESS_KEY_ID

@kdubovikov
Copy link
Author

kdubovikov commented Aug 10, 2022

Actually, I think that there is still an issue when we use multi-profile setup. The problem lies in the ml-pipeline-ui-artifact deployment which is automatically created for each profile.

Here,

we sync only MINIO_* variables. However, when using s3, this code suggests that we should provide AWS_REGION, AWS_SECRET_ACCESS_KEY, and AWS_ACCESS_KEY_ID.

region: AWS_REGION || 'us-east-1',

That means that we should add those variables to pipelines-profile-controller. When I add them manually to the ml-pipeline-ui-artifact UI fetches all s3 artifacts in the Pipeline UI as expected.

Another possible solution would be to add MINIO_REGION variable mapping here istead of modifying pipelines-profile-controller

. Although, I am not entirely sure that it will work.

@rawc0der
Copy link
Member

rawc0der commented Sep 1, 2022

Hi @kdubovikov @chensun,

Also running into this problem after switching Artifact Store persistence to S3.

Wondering if you've seen the latest MinioJS v7.0.27 with Assume Web Identity Role support minio/minio-js#960 ?

This could be part of the fix, without needing any workaround if I'm not mistaken.

Copy link

github-actions bot commented Mar 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Mar 6, 2024
Copy link

This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend kind/bug lifecycle/stale The issue / pull request is stale, any activities remove this label.
Projects
None yet
Development

No branches or pull requests

3 participants