Loading
feat: Suspend DAP workloads only when the session needs input
<
What does this MR do and why?
With dap_dynamic_suspension (wip, default off), a DAP workload on the suspendable fleet suspends on failure only and gets allow_failure: exit_codes: [75]. Rails passes DUO_SUSPEND_ON_INPUT_EXIT_CODE=75. A duo-cli that honours it exits 75 when the session stops for human input, so only those legs keep their environment. With the flag off, nothing changes.
- Only enable the flag once a duo-cli release that exits 75 is pinned. Until then, sessions exit 0 and nothing suspends.
- Not in this MR: the duo-cli change, and the discard workload for crashed legs.
- A leg that stops for input now shows as an allowed failure, so
duo_workflow_workload_completedreportsscript_failurefor it.
References
Screenshots or screen recordings
Not applicable, no UI change.
How to set up and validate locally
- In the Rails console, enable
suspendable_environment_for_dap,suspendable_workload_tag_for_dapanddap_dynamic_suspensionfor a project with DAP set up, and register a runner with thegitlab--duo--suspendabletag. - Start a flow on the project, such as Developer from an issue.
- Open the workload job: its YAML has
allow_failure: exit_codes: [75]and the variableDUO_SUSPEND_ON_INPUT_EXIT_CODE=75.Ci::Build.last.job_runtime_environmentshowssuspend_on_success: false, suspend_on_failure: true. - Disable
dap_dynamic_suspensionand start another flow: both suspend flags aretrueand the job has noallow_failure.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
</
Edited by Andras Herczeg