fix(run_task): use ACI delete retry helper for cleanup (#1503)#1504
Open
bingran-you wants to merge 1 commit intodevfrom
Open
fix(run_task): use ACI delete retry helper for cleanup (#1503)#1504bingran-you wants to merge 1 commit intodevfrom
bingran-you wants to merge 1 commit intodevfrom
Conversation
…#1503) The post-execution cleanup at codex.rs:1374 was using a single-shot 20s timeout against `az container delete`. Azure ACI delete regularly takes 30–90s under normal load, so the cleanup silently failed and containers piled up in the resource group as `Succeeded` ghosts (16 failures/day on prod, 6 leaked containers in `rg-dowhiz-oliver-dev` at time of fix). The same module already exposes `delete_aci_container_with_retry` (120s × 3 attempts, treats not-found as success), used by the warm-pool cleanup path. Switch this call site to the retry helper so both cleanup paths share the same battle-tested timeout/retry behavior.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Apr 21, 2026
Contributor
Author
|
This keeps compounding. Today's 15:15 UTC Low-risk, small diff — please prioritize review. |
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codex.rs:1374) from a single-shot 20saz container deleteto the existingdelete_aci_container_with_retryhelper (120s × 3 attempts, treats not-found as success).Closes #1503.
Why
Production was logging ~16
delete-request failed ... Command timed out (az container delete after 20s)per day, leaving 6 ghostSucceededcontainers inrg-dowhiz-oliver-dev. 20s is too tight for Azure ACI delete under normal load (30–90s typical).Test plan
cargo check -p run_task_module(passes locally).devafter merge.pm2 logs dw_worker | grep 'delete-request failed'should be ~0.az container list --resource-group dowhiz-staging-rg-260226124234 -o table | grep dwz-codexshould not grow monotonically.