Skip to content

Stop paging when a Fargate task is already deprovisioning - #15

Merged
cursor[bot] merged 1 commit into
masterfrom
dougrathbone/fargate-stop-deprovision-c6d6
Oct 14, 2026
Merged

cursor[bot] merged 1 commit into
masterfrom
dougrathbone/fargate-stop-deprovision-c6d6

Conversation

@dougrathbone

Copy link
Copy Markdown
Owner

Fixes CONDUIT-N
Fixes CONDUIT-T

After StopTask is accepted, Fargate often stays in DEPROVISIONING for minutes while the ENI detaches. The stop path treated "not STOPPED yet" as a failure, retried StopTask, and reported it to Sentry (did not reach STOPPED, then Giving up stopping task … after 3 attempt(s)).

The deprovision budget is unchanged. When it elapses and the stop was already accepted, Conduit now drops the task ARN, logs one warning, and does not send a Sentry error or schedule another StopTask. A task that stays RUNNING (stop never accepted) and real StopTask API errors still retry and report once. Shutdown no longer waits on an ARN that is already stopping.

CONDUIT-Y was checked and left as-is. An unadopted remote worker that never reconnects after a server restart still fails when the reconnect window elapses; that matches the current recovery design.

npx vitest run src/server/workers/fargateWorker.test.ts — 50 passed.

Open in Web Open in Cursor 

After StopTask is accepted, Fargate can sit in DEPROVISIONING for minutes
while the ENI detaches. Exhausting the deprovision budget is not a StopTask
failure — drop the ARN with a warning instead of Sentry error + failedStops
retry. not-accepted and API errors still retry and report once.

Fixes CONDUIT-N
Fixes CONDUIT-T
@cursor
cursor Bot merged commit c6d7759 into master Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants