docker-buildkite-plugin icon indicating copy to clipboard operation
docker-buildkite-plugin copied to clipboard

Exit codes > 1 are not correctly propagated

Open krfricke opened this issue 4 years ago • 1 comments

Exit codes > 1 are not propagated to buildkite, thus e.g. automatic retry triggers that depend on exit code are failing.

Pipeline:

steps:
  - label: ":pipeline:"
    agents:
      queue: runner_queue_branch
    plugins:
      "docker#v3.9.0":
        image: ubuntu
        propagate-environment": True
    command: exit 2

Output:


🚨 Error: The command exited with status 1
--

user command error: The plugin docker command hook exited with status 1

Is this an error on buildkite core or in this plugin?

krfricke avatar Dec 01 '21 19:12 krfricke

I also ran into this on docker#v3.8.0. Noting that someone else reported it for docker#v3.3.0 here: https://forum.buildkite.community/t/exit-code-is-not-being-respected/1142

It seems like it is contained to the plugin, since https://github.com/buildkite-plugins/docker-compose-buildkite-plugin (tested on docker-compose#v3.0.3) correctly propagates exit codes.

saifelse avatar Dec 06 '21 18:12 saifelse

Indeed, this was a very big issue. I have corrected it in PR #213 and added tests so that we don't cause a regression in the future :)

toote avatar Sep 20 '22 19:09 toote