Hardcode VERSION to oadp-dev for standardised version reporting#188
Conversation
Previously VERSION was derived from git tags/describe, which produced opaque commit hashes. Hardcoding to the branch name (oadp-dev) gives users a meaningful version string via `oc oadp version`. Release branches update this value when cut (e.g., oadp-1.6). Signed-off-by: Joseph <jvaikath@redhat.com>
📝 WalkthroughWalkthroughThis PR standardizes version defaults across build configurations. ChangesVersion Default Unification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Makefile (1)
8-8: Ensure release pipeline explicitly passesVERSION.Since
VERSION ?= oadp-devis now a static string (not derived from git tags), any CI/CD release job that does not explicitly setVERSION=oadp-X.Ywill silently produce archives, checksums, and krew manifests stampedoadp-dev. A guard or validation step in the release workflow (e.g., assertingVERSION != oadp-devbefore publishing) would prevent accidental dev-labeled releases.🤖 Prompt for 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. In `@Makefile` at line 8, The Makefile currently defaults VERSION ?= oadp-dev which can silently produce dev-stamped artifacts; add a guard that fails the build when VERSION remains the default (e.g., add a validate step or a top-level conditional check that errors if VERSION == oadp-dev) and ensure release targets (e.g., your existing release/build targets) depend on that validation, or alternatively add a CI workflow assertion that explicitly requires VERSION to be set (assert VERSION != oadp-dev) before publishing.
🤖 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.
Nitpick comments:
In `@Makefile`:
- Line 8: The Makefile currently defaults VERSION ?= oadp-dev which can silently
produce dev-stamped artifacts; add a guard that fails the build when VERSION
remains the default (e.g., add a validate step or a top-level conditional check
that errors if VERSION == oadp-dev) and ensure release targets (e.g., your
existing release/build targets) depend on that validation, or alternatively add
a CI workflow assertion that explicitly requires VERSION to be set (assert
VERSION != oadp-dev) before publishing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 34d1d68c-f3e0-44eb-b2bb-84969b2c2cf4
📒 Files selected for processing (2)
Containerfile.downloadMakefile
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Joeavaikath, shubham-pampattiwar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Why the changes were made
Previously,
VERSIONwas derived fromgit describe --tags --always --dirty,which produced opaque commit hashes (e.g.,
c548518-dirty) as the versionstring. This made
oc oadp versionoutput meaningless to users.This PR hardcodes the version to
oadp-devin both the Makefile andContainerfile.download so that users get a clear, recognisable version
string that maps to the branch the binary was built from. When a release
branch is cut (e.g.,
oadp-1.6), this value is updated as part of thebranch cut process. The git SHA is still injected separately for exact
commit identification.
How to test the changes made
make buildand run./kubectl-oadp version—client version should show
oadp-dev.make installand runoc oadp version— same result.podman build -f Containerfile.download .and verify the embedded binaries report
oadp-dev.Summary by CodeRabbit
devtooadp-devto ensure consistent versioning across release artifacts and container builds.