build: derive STABLE_VERSION from NVCF_VERSION or mr-<sha> only - #646
build: derive STABLE_VERSION from NVCF_VERSION or mr-<sha> only#646priyaselvaganesan wants to merge 1 commit into
STABLE_VERSION from NVCF_VERSION or mr-<sha> only#646Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe workspace status script now uses ChangesVersion selection
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/workspace_status.sh`:
- Around line 26-33: Add regression tests for tools/workspace_status.sh covering
NVCF_VERSION=1.2.3, an unset variable, and unrelated path-prefixed tags at HEAD,
asserting the expected STABLE_VERSION in each case. Also update the stale git
describe behavior documented in BAZEL.md to reflect the current
version-selection logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 39fbb742-9dab-47d6-a08f-d1431f2cb2f0
📒 Files selected for processing (1)
tools/workspace_status.sh
e698fe0 to
86999b8
Compare
86999b8 to
1adffd4
Compare
1adffd4 to
c598e55
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/scripts/test/test-workspace-status.sh`:
- Around line 21-28: Strengthen the unset-NVCF_VERSION assertion in the test
case around stable_version by comparing the result exactly with mr-$(git
rev-parse --short HEAD), rather than only checking its prefix and absence of
'/'. Create a deterministic temporary Git fixture whose HEAD has a path-prefixed
tag, run stable_version from that fixture, and assert the same exact
commit-derived fallback so the regression does not depend on the current
checkout’s tags.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: cd4da71e-8923-44ee-8630-1765dfe9ea29
📒 Files selected for processing (3)
BAZEL.mdtools/scripts/test/test-workspace-status.shtools/workspace_status.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- tools/workspace_status.sh
c598e55 to
b164ac5
Compare
git describe --tags --exact-match returned an arbitrary path-prefixed tag (e.g. deploy/stacks/nvcf-compute-plane/v0.2.0-dev.231) as the version, because a single monorepo commit carries many unrelated artifact tags. Drop that branch; STABLE_VERSION now comes from NVCF_VERSION (clean semver, set by release builds) or mr-<sha> for dev builds.
b164ac5 to
1c28d12
Compare
STABLE_VERSION from NVCF_VERSION or mr-<sha> only
Why
tools/workspace_status.shderivedSTABLE_VERSIONfromgit describe --tags --exact-match HEADwhenNVCF_VERSIONwas unset. In this monorepo a single commit carries many path-prefixed tags for unrelated artifacts (deploy/stacks/*,src/*/v*), andgit describereturns an arbitrary one. So a local--stampbuild could stamp an unrelated tag such asdeploy/stacks/nvcf-compute-plane/v0.2.0-dev.231as a service's version (it then flows into/infoand image tags).What changed
Drop the
git describe --exact-matchbranch.STABLE_VERSIONnow comes fromNVCF_VERSION(set by the release build to the clean,tag_prefix-stripped semver) or falls back tomr-<sha>for dev/MR builds.Release builds are unaffected:
NVCF_VERSIONis set on the releasebazel run --stamppath, so they already take that branch. Only local/dev builds change, from an arbitrary path-prefixed tag tomr-<sha>.Testing
Issues
Relates to #315
Summary by CodeRabbit
Bug Fixes
NVCF_VERSION.Documentation
Tests