controller/vm: CreateVM: log the HCS document - #2921
Open
Tingmao Wang (micromaomao) wants to merge 1 commit into
Open
controller/vm: CreateVM: log the HCS document#2921Tingmao Wang (micromaomao) wants to merge 1 commit into
Tingmao Wang (micromaomao) wants to merge 1 commit into
Conversation
Assisted-by: GitHub-Copilot Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
Copilot started reviewing on behalf of
Tingmao Wang (micromaomao)
September 3, 2026 15:42
View session
There was a problem hiding this comment.
🟡 Changes recommended
HCS document serialization must be skipped when debug logging is disabled.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds debug logging of the generated HCS document during VM creation.
Changes:
- Logs the HCS document before invoking
vmmanager.Create. - Requires guarding serialization behind a debug-level check to avoid unnecessary overhead.
File summaries
| File | Description |
|---|---|
internal/controller/vm/vm.go |
Adds HCS document logging; debug-disabled paths currently incur serialization cost. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| default: | ||
| return fmt.Errorf("cannot create VM: VM is in incorrect state %s", c.vmState) | ||
| } | ||
| log.G(ctx).WithField("hcs-document", log.Format(ctx, hcsDocument)).Debug("creating utility VM") |
Contributor
There was a problem hiding this comment.
Worth the check!
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.
Assisted-by: GitHub-Copilot