Skip to content

fix: cleanup uses fresh context after volume create failure - #541

Open
Mesut Oezdil (mesutoezdil) wants to merge 1 commit into
agent-substrate:mainfrom
mesutoezdil:fix/volume-cleanup-context
Open

fix: cleanup uses fresh context after volume create failure#541
Mesut Oezdil (mesutoezdil) wants to merge 1 commit into
agent-substrate:mainfrom
mesutoezdil:fix/volume-cleanup-context

Conversation

@mesutoezdil

@mesutoezdil Mesut Oezdil (mesutoezdil) commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

A half-created actor has two cleanup paths, and both reused the caller's ctx: the one after CreateVolume fails, and the one after the DB write fails in CreateActor. When a canceled or expired ctx is what caused the failure, every delete failed for the same reason right away and the external volumes leaked.

Both now go through cleanupActorVolumes, which detaches from the caller's ctx and applies its own 30s timeout. Test covers the canceled-ctx case.

Both cleanup paths for a half-created actor reused the caller's context.
When a canceled or expired context is what made creation fail, every
delete failed immediately and the external volumes leaked. Route both
sites through cleanupActorVolumes, which detaches from the caller's
context and applies its own 30s timeout.
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.

1 participant