Skip to content

fix(sandbox): add context to vm errors - #261

Merged
dmcgowan merged 1 commit into
containerd:mainfrom
austinvazquez:fix/add-context-to-sandbox-errors
Jul 29, 2026
Merged

fix(sandbox): add context to vm errors#261
dmcgowan merged 1 commit into
containerd:mainfrom
austinvazquez:fix/add-context-to-sandbox-errors

Conversation

@austinvazquez

Copy link
Copy Markdown
Member

This change adds context to sandbox vm errors so it is more clear to the caller the assumption that was broken resulting in the error.

Copilot AI review requested due to automatic review settings July 29, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves debuggability of the VM-backed sandbox implementation by adding contextual messages to ErrFailedPrecondition returns, making it clearer which sandbox lifecycle assumption was violated.

Changes:

  • Wrap errdefs.ErrFailedPrecondition with a clearer message when Start() is called on an already-started sandbox.
  • Wrap errdefs.ErrFailedPrecondition with a clearer message when Stop(), Client(), or StartStream() are called before the sandbox is started.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/shim/sandbox/vm/vm.go Outdated
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
@austinvazquez
austinvazquez force-pushed the fix/add-context-to-sandbox-errors branch from f448f5f to ced59d5 Compare July 29, 2026 20:16
Copilot AI review requested due to automatic review settings July 29, 2026 20:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@dmcgowan
dmcgowan merged commit d191b29 into containerd:main Jul 29, 2026
16 checks passed
@austinvazquez
austinvazquez deleted the fix/add-context-to-sandbox-errors branch July 29, 2026 20:26
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.

3 participants