Closed mogopz closed 3 years ago
endpoint
can be separately defined in yaml and it has a special key, however, it is still appended to $BK_AWS_ARGS
which is piped to aws s3api head-object
just like s3 cp
command. See: https://github.com/gencer/cache-buildkite-plugin/blob/17ee0f78000acc59ef081aeda95bae38b75e10a3/lib/backends/s3.bash#L51
What we are going to do here is to use separate variable to hold pre-defined keys and only pass this variable to head-object
and for other calls we will merge it with $BK_AWS_ARGS
.
However, If you are intend to work on this PR, please take above into consideration.
Thanks @gencer, I've opened a PR - let me know what you think
Thanks @mogggggg for this great PR. I've gone ahead and merged.
Will release a new version soon. 🚀🎉
Released as v2.4.9
🎉
Hi, In your README you mention that the
args
argument gets passed to thes3 cp
command but in the code it's also being passed to theaws s3api head-object
command.This breaks a lot of arguments that someone might want to potentially pass (in my case
--acl
) since the two commands don't share the same options. For example when I try to set--acl
the cache plugin fails once it tries to check for an existing cache:I'm happy to open a PR to fix this if you let me know how you'd prefer to handle this. The PR that added custom args to the
head-object
command mentions needing it so they can set the endpoint, but that's already configurable with theendpoint
argument so I think it makes the most sense to just remove the custom args from thehead-object
call.