Skip to content

fix: report commit hashes instead of unrelated component tags#800

Merged
kvinwang merged 3 commits into
masterfrom
fix/vmm-git-revision
Jul 20, 2026
Merged

fix: report commit hashes instead of unrelated component tags#800
kvinwang merged 3 commits into
masterfrom
fix/vmm-git-revision

Conversation

@kvinwang

@kvinwang kvinwang commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

git_version! uses git describe, which selects the nearest tag. Because dstack is a monorepo with component-specific tags, binaries can report an unrelated component tag. For example, VMM reported git:verifier-v0.5.11-..., which the UI truncated to git:verifier-v.

Change

  • add a shared dstack-build-info crate;
  • expose a zero-argument git_revision!() macro with the repository-wide Git revision policy;
  • exclude tags so revisions consistently use the 20-character commit hash;
  • preserve the git: prefix, dirty suffix, and fallback behavior;
  • migrate VMM, Gateway, KMS, Supervisor, and Guest Agent to the shared macro.

Validation

cargo fmt --all -- --check
cargo check -p dstack-build-info -p dstack-vmm -p dstack-gateway -p dstack-kms -p supervisor -p dstack-guest-agent

Copilot AI review requested due to automatic review settings July 20, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes the VMM’s reported revision string so it always shows an abbreviated commit hash (rather than an unrelated component tag) in the version output and UI.

Changes:

  • Updates the git_version! invocation to pass git describe --exclude=*, preventing tag-based descriptions in this monorepo.
  • Adds a short comment explaining why tags are excluded (component-scoped tags can be misleading for VMM).

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

@kvinwang kvinwang changed the title fix(vmm): report commit hash instead of unrelated component tag fix: report commit hashes instead of unrelated component tags Jul 20, 2026
@kvinwang
kvinwang merged commit 49723e4 into master Jul 20, 2026
15 checks passed
@kvinwang
kvinwang deleted the fix/vmm-git-revision branch July 20, 2026 14:04
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.

2 participants