-
Notifications
You must be signed in to change notification settings - Fork 274
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
Support custom endpoint URL for AWS S3 binary caching #896
Support custom endpoint URL for AWS S3 binary caching #896
Conversation
@microsoft-github-policy-service agree |
…endpoint-url # Conflicts: # src/vcpkg/binarycaching.cpp
Hm but it is not possible to have different endpoint urls right? |
Oops, I thought I could only use one source per provider ( |
Yeah it has the same problem. Maybe change it to |
Updated. I had to add a |
…file Syntax is now `x-aws,<prefix>[,<rw>[,endpoint-url=<endpoint-url>][,profile=<profile>]]` where `endpoint-url` and `profile` are interchangeable
116922e
to
6df7b48
Compare
6df7b48
to
3963ccf
Compare
I like this direction. It needs:
I prefer getting the information in here rather than employing other environment variables. We did that for the GitHub Actions provider but there we know there will only ever be one of those providers in use (since the token we are looking for there is assigned by GHA to the machine) Sorry for the delayed review; been slammed with VS deadlines that are thankfully now past :) |
@SegaraRai is this still being worked on? |
No. I'm afraid I've retired from a job that uses vcpkg and lost interest. |
I'm sorry to hear that. If that changes feel free to reopen this or open a new PR with similar changes. |
This PR adds support for specifying a custom S3 endpoint URL for AWS S3 binary caches.
This will enable us to use S3 compatible storages such as Backblaze B2, Cloudflare R2, MinIO, Storj DCS, Wasabi, etc.
Demo: https://github.com/SegaraRai/vcpkg-aws-s3-custom-endpoint-demo
Implementation
UPDATE: See comments below.
Added newendpoint-url
support tox-aws-config
, which is currently used to specify--no-sign-request
.Usex-aws-config,endpoint-url,https://s3.ap-northeast-1.wasabisys.com;x-aws,s3://example-bucket/,readwrite
to specifyendpoint-url
.To useno-sign-request
andendpoint-url
at the same time, usex-aws-config,endpoint-url,https://s3.ap-northeast-1.wasabisys.com;x-aws-config,no-sign-request;x-aws,s3://example-bucket/,readwrite
.Alternative solutions
VCPKG_AWS_S3_ENDPOINT_URL
environment variable.VCPKG_AWS_CLI_EXTRA_ARGS
environment variable.x-aws-config
source, with aliasingno-sign-request
to--no-sign-request
.Additional context
In the AWS CLI, the endpoint URL can only be specified with the
--endpoint-url
argument; the endpoint URL cannot be specified using environment variables or configuration files.This is a known issue of the AWS CLI: aws/aws-cli#1270.
Related: microsoft/vcpkg#25039