Warn when a continuous job does not set task_retry_mode#5691
Warn when a continuous job does not set task_retry_mode#5691pranshupand-db wants to merge 3 commits into
Conversation
Adds a fast validation that emits a warning when a DABs job task does not configure max_retries. Such tasks are never retried on failure, which is a common source of avoidable job failures. An explicit max_retries (including 0) is treated as a deliberate choice and does not warn.
Approval status: pending
|
task_retry_mode is a property of a job's continuous block (enum NEVER | ON_FAILURE, default NEVER) that controls whether a continuous job retries its tasks. The warning now fires only when a job defines a continuous block without task_retry_mode, rather than on every task missing max_retries.
…rning NEXT_CHANGELOG.md documents the new bundle validate warning. The acceptance test under acceptance/bundle/validate/continuous_task_retry_mode covers a continuous job missing task_retry_mode (warns) alongside one that sets it (no warning). Its output.txt and out.test.toml must be generated with `./task test-update`, which requires the Go 1.26.4 toolchain unavailable here.
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Summary
validate:continuous_task_retry_mode) that emits a warning when a DABs job defines acontinuousblock but does not setcontinuous.task_retry_mode.task_retry_mode(enumNEVER|ON_FAILURE) defaults toNEVER, so without it a continuous job does not retry its tasks on failure. The warning makes this implicit behavior visible.task_retry_mode(NEVERorON_FAILURE) is treated as a deliberate choice and does not warn — detected on the dynamic config value.FastValidate, so it runs onbundle validateandbundle deploy.NEXT_CHANGELOG.mdentry under Bundles.Best-practices checklist
Warningseverity, matching every other diagnostic inbundle/config/validateand the requested behavior.dynconfig (dyn.MapByPattern), not a Go map.continuous_task_retry_mode_test.go(warns when unset, no warn when set, no warn without a continuous block).acceptance/bundle/validate/continuous_task_retry_mode/.Test plan
go test ./bundle/config/validate/ -run TestContinuousTaskRetryMode./task test-updateto generateoutput.txt+out.test.tomlfor the new acceptance test (and refresh any other bundles that now surface this warning)./task fmt && ./task lint