Skip to content

underhill_core: print branch in addition to crate#2880

Open
mattkur wants to merge 1 commit intomicrosoft:mainfrom
mattkur:print-crate
Open

underhill_core: print branch in addition to crate#2880
mattkur wants to merge 1 commit intomicrosoft:mainfrom
mattkur:print-crate

Conversation

@mattkur
Copy link
Contributor

@mattkur mattkur commented Mar 4, 2026

Our production logs only print a commit hash. Knowing which branch it came from is helpful in certain cases, as well.

Copilot AI review requested due to automatic review settings March 4, 2026 18:56
@mattkur mattkur requested a review from a team as a code owner March 4, 2026 18:56
@github-actions github-actions bot added the unsafe Related to unsafe code label Mar 4, 2026
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

Copy link
Contributor

Copilot AI left a comment

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 updates Underhill (OpenHCL) startup logging to include additional build metadata so production logs can better identify what build is running.

Changes:

  • Add a BuildInfo::openhcl_version() accessor in openhcl/build_info.
  • Log openhcl_version alongside crate_name and scm_revision during Underhill startup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
openhcl/underhill_core/src/lib.rs Extends the “VMM process” startup log fields to include openhcl_version.
openhcl/build_info/src/lib.rs Exposes the already-stored openhcl_version field via a new getter.

Comment on lines 194 to +202
let crate_name = build_info::get().crate_name();
let crate_revision = build_info::get().scm_revision();
tracing::info!(CVM_ALLOWED, ?crate_name, ?crate_revision, "VMM process");
let openhcl_version = build_info::get().openhcl_version();
tracing::info!(
CVM_ALLOWED,
?crate_name,
?crate_revision,
?openhcl_version,
"VMM process"
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The PR description/title mention printing the SCM branch, but this log adds openhcl_version and still does not emit scm_branch (available as build_info::get().scm_branch()). If the goal is to identify which git branch produced the build, log scm_branch here (optionally alongside openhcl_version if that’s also useful).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unsafe Related to unsafe code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants