feat: add S3 path-style addressing support#18
Open
AnatolyRugalev wants to merge 1 commit intorichardartoul:mainfrom
Open
feat: add S3 path-style addressing support#18AnatolyRugalev wants to merge 1 commit intorichardartoul:mainfrom
AnatolyRugalev wants to merge 1 commit intorichardartoul:mainfrom
Conversation
Add UsePathStyle option to S3Config, controllable via GOBUILDCACHE_AWS_S3_USE_PATH_STYLE env var (or AWS_S3_USE_PATH_STYLE). When enabled, the S3 client uses path-style requests (endpoint:port/bucket) instead of virtual-hosted-style (bucket.endpoint:port). This is required for S3-compatible backends like LocalStack and MinIO. Fixes richardartoul#17 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UsePathStyleoption toS3ConfigstructGOBUILDCACHE_AWS_S3_USE_PATH_STYLE=trueenv var (orAWS_S3_USE_PATH_STYLE)endpoint:port/bucket) instead of virtual-hosted-style (bucket.endpoint:port)Motivation
S3-compatible backends like LocalStack and MinIO require path-style addressing. Without this option,
gobuildcachefails with 500/403 errors when using a customAWS_ENDPOINT_URLbecause the SDK tries to resolvebucket-name.endpoint:portwhich these backends can't handle.Fixes #17
Test plan
go build ./...passes🤖 Generated with Claude Code