buildkite / elastic-ci-stack-for-aws

An auto-scaling cluster of build agents running in your own AWS VPC
https://buildkite.com/docs/quickstart/elastic-ci-stack-aws
MIT License
418 stars 272 forks source link

Linux env hook was too eager, breaking ECR retries #1298

Closed lucaswilric closed 7 months ago

lucaswilric commented 7 months ago

When we introduced the environment hook error trap in #1179, we set it to propagate into all source-d plugin environment hooks. Unfortunately, this breaks the retry function in the ECR plugin's environment hook (which runs a command and then checks the exit code to determine whether to retry) by interrupting execution before the exit code can be checked.

Repro: https://github.com/buildkite-plugins/ecr-buildkite-plugin/pull/101

Fix by temporarily unsetting -E, stopping propagation of the trap command into the plugin environment hook.

lucaswilric commented 7 months ago

Superseded by buildkite-plugins/ecr-buildkite-plugin#102