Skip to content

Specify that gcs_endpoint must use base API URL only #158#160

Open
Its-Alex wants to merge 1 commit intoorgrim:masterfrom
Its-Alex:master
Open

Specify that gcs_endpoint must use base API URL only #158#160
Its-Alex wants to merge 1 commit intoorgrim:masterfrom
Its-Alex:master

Conversation

@Its-Alex
Copy link

Following #158 (comment) I made this PR

Copilot AI review requested due to automatic review settings March 20, 2026 19:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the sample configuration to clarify expected usage of gcs_endpoint for Google Cloud Storage, aiming to prevent misconfiguration that can lead to incorrect bucket parsing (Issue #158).

Changes:

  • Adds a note in pg_back.conf about how to format gcs_endpoint when using a custom endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +172 to +173
# Note: when using a custom gcs_endpoint, do not specify https:// just use the
# base API URL
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The added note is likely misleading: gcs_endpoint is passed verbatim to option.WithEndpoint() (upload.go) and generally needs to be a full URL including scheme (e.g. https://...). The problem described in #158 is usually caused by including extra path segments like /b or the bucket in the endpoint; consider rewording to explicitly say the endpoint must be the base GCS JSON API endpoint (e.g. https://storage.googleapis.com/storage/v1/) and must not include /b or the bucket name, rather than advising users to omit https:// entirely.

Suggested change
# Note: when using a custom gcs_endpoint, do not specify https:// just use the
# base API URL
# Note: when using a custom gcs_endpoint, it is passed verbatim to the client
# and should be the base GCS JSON API endpoint as a full URL, including scheme
# (for example: https://storage.googleapis.com/storage/v1/). Do not append /b
# or the bucket name to this endpoint.

Copilot uses AI. Check for mistakes.
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.

2 participants