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

fix: Bucket postfix trailing slash #317

Merged
merged 3 commits into from
Jan 16, 2025
Merged

Conversation

zacharyblasczyk
Copy link
Contributor

@zacharyblasczyk zacharyblasczyk commented Jan 16, 2025

This solves an issue where there is a trailing / in the bucket if path is not set.

Before:

            - name: BUCKET
              value: "gs://$(BUCKET_NAME)/$(BUCKET_PATH)"

After

            - name: BUCKET
              value: "gs://$(BUCKET_NAME)"

The problem is that then the bucket will be

Before

BUCKET=gs://wandb-qa-local-whole-crow/

After

BUCKET=gs://wandb-qa-local-whole-crow

Which can lead to issues with the application.

@zacharyblasczyk zacharyblasczyk changed the title fix: Bucket Prefix fix: Bucket postfix Jan 16, 2025
@zacharyblasczyk zacharyblasczyk changed the title fix: Bucket postfix fix: Bucket postfix trailing slash Jan 16, 2025
@zacharyblasczyk zacharyblasczyk merged commit 9ef4faf into main Jan 16, 2025
1 of 2 checks passed
@zacharyblasczyk zacharyblasczyk deleted the zacharyb/fix-bucket-prefix branch January 16, 2025 21:22

{{- if eq $provider "s3" -}}
{{- if or (and $accessKey $secretKey) .Values.global.bucket.secret.secretName -}}
{{- $url = "s3://$(BUCKET_ACCESS_KEY):$(BUCKET_SECRET_KEY)@$(BUCKET_NAME)" -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this be a problem in the self-hosted s3 case where I believe we end up setting BUCKET_NAME to the url of the s3 server?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is ok as path wouldn't be none in that case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants