buildkite-graph
buildkite-graph copied to clipboard
🐛 generating `timeout_in_minutes` silently fails unless ALL steps provide a non-zero value
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 ✅