refactor(vmm): name bridge prepare RPC explicitly - #1064
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the netd “prepare” RPC explicitly bridge-scoped (prepare_bridge) to remove ambiguity ahead of adding additional preparation operations. It updates both the request data types and the VMM caller, and adds a serialization test to lock in the protocol name.
Changes:
- Renamed
PrepareRequesttoPrepareBridgeRequestandRequest::PreparetoRequest::PrepareBridge. - Renamed bridge-specific helpers to match the explicit bridge operation naming.
- Added a protocol serialization test asserting
"operation": "prepare_bridge".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dstack/vmm/src/netd.rs | Renames the prepare request/operation to an explicit bridge variant and adds a JSON serialization test for the operation tag. |
| dstack/vmm/src/app.rs | Updates the VMM’s netd client call site to use PrepareBridgeRequest / Request::PrepareBridge. |
Suppressed comments (1)
dstack/vmm/src/app.rs:567
- This comment refers to the operation as "Prepare", but the request variant is now
PrepareBridge. Updating the comment will keep the failure/rollback explanation aligned with the protocol terminology.
// The client may have timed out while netd was still finishing
// this Prepare. Remove the in-flight identity first; netd's
// serialized accept loop processes it after Prepare completes.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
The existing request only prepares a TAP attached to a bridge with a libvirt nwfilter binding. Naming the bridge operation explicitly avoids ambiguity before adding other preparation operations.
Validation