Skip to content

fix(server): prevent deleting providers still referenced by sandboxes…#429

Open
leoshi01 wants to merge 4 commits intoNVIDIA:mainfrom
leoshi01:fix/prevent-delete-referenced-provider
Open

fix(server): prevent deleting providers still referenced by sandboxes…#429
leoshi01 wants to merge 4 commits intoNVIDIA:mainfrom
leoshi01:fix/prevent-delete-referenced-provider

Conversation

@leoshi01
Copy link
Member

@leoshi01 leoshi01 commented Mar 18, 2026

Block provider deletion when the provider is still referenced by any sandbox (spec.providers) or inference route (inference.local, sandbox-system). Returns FAILED_PRECONDITION with an actionable error message listing the referencing resources.

Closes #157

Summary

Related Issue

Changes

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

… or inference routes

Block provider deletion when the provider is still referenced by any
sandbox (spec.providers) or inference route (inference.local,
sandbox-system). Returns FAILED_PRECONDITION with an actionable error
message listing the referencing resources.

Closes NVIDIA#157
@leoshi01 leoshi01 requested a review from a team as a code owner March 18, 2026 07:43
Sandboxes in the Deleting phase still exist in the store but should not
block provider deletion since they are already being torn down.
…hint

Skip the full sandbox/route scan when the provider does not exist,
avoiding unnecessary I/O. Also append an actionable hint to the
FAILED_PRECONDITION error message per the issue acceptance criteria.
@drew
Copy link
Collaborator

drew commented Mar 18, 2026

Thanks for the contribution. Our intent is to address referential integrity and data consistency at the data access layer, rather than per entity. This is an effort that we have roadmapped.

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.

Prevent deleting providers that are still referenced

2 participants