buildkite-graph icon indicating copy to clipboard operation
buildkite-graph copied to clipboard

🐛 generating `timeout_in_minutes` silently fails unless ALL steps provide a non-zero value

Open reececomo opened this issue 2 years ago • 0 comments

Expected output

- label: ":bash: My pipeline"
  commands:
    - script_a.sh
    - script_b.sh
  timeout_in_minutes: 20

Failure cases

new CommandStep(['script_a.sh', new Command('script_b.sh', 20)], ':bash: My pipeline');
// expected: timeout_in_minutes: 20
// received: timeout_in_minutes: 0 ❌

new CommandStep([new Command('script_a.sh'), new Command('script_b.sh', 20)], ':bash: My pipeline');
// expected: timeout_in_minutes: 20
// received: timeout_in_minutes: 0 ❌

new CommandStep([new Command('script_a.sh', 0), new Command('script_b.sh', 20)], ':bash: My pipeline');
// expected: timeout_in_minutes: 20
// received: 💥 ArgumentError: Expected number `timeout` to be positive, got 0

Workaround

new CommandStep([new Command('script_a.sh', 1), new Command('script_b.sh', 19)], ':bash: My pipeline');
// expected: timeout_in_minutes: 20
// received: timeout_in_minutes: 20 ✅

reececomo avatar Jul 19 '22 06:07 reececomo