Use reverse ordering for post-command hooks #1646
Labels
breaking
Changes to existing behaviour users might rely on
experiment
thinking🤔
v4
Breaking changes that will be included in Agent v4
Is your feature request related to a problem? Please describe.
We use a plugin that assumes an AWS role during the
pre-command
hook. We also use a plugin (https://github.com/gencer/cache-buildkite-plugin) for caching, which reads from an s3 bucket using the agent's instance role credentials.The
pre-command
hooks work fine, since we can rely on ordering and have the cache plugin go first. Then the assume role plugin runs and injects AWS_ACCESS_KEY type environment variables, which we use in thecommand
.The
post-command
hooks fail though, because the cache plugin goes first, but tries to write to s3 using the assumed role.Describe the solution you'd like
Use reverse ordering for
post-command
hooks. This ensures that they can clean up in the proper order and avoid this type of problem.Describe alternatives you've considered
We've just stopped using the cache plugin for now, but that isn't ideal.
Additional context
n/a
The text was updated successfully, but these errors were encountered: