Skip to content

chore: rename version variables for clarity#2123

Merged
fabianburth merged 8 commits into
open-component-model:mainfrom
fabianburth:chore/rename-versions
Mar 31, 2026
Merged

chore: rename version variables for clarity#2123
fabianburth merged 8 commits into
open-component-model:mainfrom
fabianburth:chore/rename-versions

Conversation

@fabianburth

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Highest Final Version and Final Version were quite hard to intuitively understand without additional documentation. This PR introduces a clearer naming scheme here.

Which issue(s) this PR fixes

Contributes to open-component-model/ocm-project#971

Testing

How to test the changes
Verification
  • I have tested the changes locally by running ocm

- Updated all references of `highestFinalVersion` to `highestPreviousVersion` for improved clarity and alignment with terminology.
- Adjusted variable names, function names, and documentation across multiple scripts and workflows.
- Ensured all tests reflect the new naming convention and maintain backward compatibility.
- Change impacts workflows related to release preparation and finalization, improving code readability and consistency.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
… `newReleaseVersion`

- Updated all references to `finalTag` and `finalVersion` across scripts, workflows, and tests to use `newReleaseTag` and `newReleaseVersion`.
- Adjusted variable names, function names, and documentation for clarity and alignment with new naming conventions.
- Ensured all test cases follow the updated terminology to maintain consistency and backward compatibility.
- Improved workflow readability and reduced ambiguity in release lifecycle-related scripts.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
… `newReleaseVersion`

- Updated all references to `finalTag` and `finalVersion` in scripts and workflows.
- Renamed variables, functions, and documentation to reflect the new naming.
- Improved clarity of workflows related to release processes by adopting consistent terminology.
- Ensured backward compatibility by testing the changes thoroughly.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@fabianburth fabianburth requested a review from a team as a code owner March 30, 2026 14:52
@github-actions github-actions Bot added kind/chore chore, maintenance, etc. component/github-actions Changes on GitHub Actions or within `.github/` directory size/m Medium labels Mar 30, 2026
@coderabbitai

coderabbitai Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 91b58b9f-f687-4ffb-93de-6d0beeadcbcb

📥 Commits

Reviewing files that changed from the base of the PR and between 6c8b617 and 5d7d420.

📒 Files selected for processing (1)
  • .github/workflows/cli-release.yml

📝 Walkthrough

Walkthrough

This PR renames release pipeline terminology from "final" to "new release" across CI workflows and scripts, updating function names, environment variables, parameters, and workflow outputs to use newReleaseTag/NEW_RELEASE_TAG and newReleaseVersion/NEW_RELEASE_VERSION.

Changes

Cohort / File(s) Summary
Tag creation scripts
.github/scripts/create-tag.js, .github/scripts/create-tag.test.js
Renamed exported function createFinalTagcreateNewReleaseTag; switched env var FINAL_TAGNEW_RELEASE_TAG; updated tests, messages, idempotency and error paths to use new naming.
Release publication scripts
.github/scripts/publish-final-release.js, .github/scripts/publish-final-release.test.js
Renamed params/options and env contract: finalTag/finalVersionnewReleaseTag/newReleaseVersion; updated prepareReleaseNotes, getOrCreateRelease, writeSummary signatures and logic; tests updated; HIGHEST_PREVIOUS_RELEASE_VERSION replaces HIGHEST_FINAL_VERSION.
Version determination scripts
.github/scripts/release-versioning.js, .github/scripts/release-versioning.test.js
Env var PROMOTION_VERSIONNEW_RELEASE_VERSION; renamed helper extractHighestFinalVersionextractHighestPreviousReleaseVersion; updated shouldSetLatest parameter names and summary labels; tests adjusted.
Workflows (CLI / Controller / RC)
.github/workflows/cli-release.yml, .github/workflows/controller-release.yml, .github/workflows/release-candidate-version.yml
Renamed workflow env vars, outputs and step labels: FINAL_TAGNEW_RELEASE_TAG, FINAL_VERSIONNEW_RELEASE_VERSION, HIGHEST_FINAL_VERSIONHIGHEST_PREVIOUS_RELEASE_VERSION; steps updated to call renamed script entrypoints and pass new variables; ORAS/OCI tag usages updated.

Sequence Diagram(s)

(omitted — changes are renames/parameter updates without new multi-component control-flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

size/l

Suggested reviewers

  • frewilhelm
  • Skarlso

Poem

🐰 I hopped from final to new release with glee,
Renamed tags and tests for all to see,
Workflows hum and scripts now sing,
Fresh env names take to wing,
A hoppity change — hooray for me! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: renaming version variables throughout the codebase for improved clarity.
Description check ✅ Passed The description is directly related to the changeset, explaining why the variable renaming was needed (improved clarity for 'Highest Final Version' and 'Final Version') and referencing the relevant issue.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
piotrjanik
piotrjanik previously approved these changes Mar 30, 2026
- Renamed output labels for clarity:
  - "Latest Stable" -> "Previous Base Version"
  - "Latest RC" -> "Previous Base RC Version"
  - "Next RC Version" -> "Next Base RC Version"
- Updates align naming conventions across the script with recent variable name changes.
- Improves readability and reduces ambiguity in versioning-related output.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
.github/scripts/release-versioning.js (1)

20-40: Variable renames look good, but consider aligning computeNextVersions parameter names.

The renamed variables (previousBaseVersion, previousBaseRcVersion) improve clarity. However, the computeNextVersions function signature on line 141 still uses latestStableTag and latestRcTag as parameter names, which creates an inconsistency with the caller's variable names and the PR's goal of clearer naming.

♻️ Optional: Align parameter names in `computeNextVersions`
-export function computeNextVersions(basePrefix, latestStableTag, latestRcTag, bumpMinorVersion) {
+export function computeNextVersions(basePrefix, previousBaseVersionTag, previousBaseRcVersionTag, bumpMinorVersion) {

Note: This would require updating the internal references within the function as well.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/scripts/release-versioning.js around lines 20 - 40, Rename the
parameters in computeNextVersions from latestStableTag and latestRcTag to
previousBaseVersion and previousBaseRcVersion (or vice-versa to match caller),
and update all internal references inside computeNextVersions accordingly so the
parameter names align with the renamed variables used at the call site
(previousBaseVersion, previousBaseRcVersion) where
computeNextVersions(basePrefix, previousBaseVersion, previousBaseRcVersion,
false) is invoked.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/scripts/release-versioning.js:
- Around line 20-40: Rename the parameters in computeNextVersions from
latestStableTag and latestRcTag to previousBaseVersion and previousBaseRcVersion
(or vice-versa to match caller), and update all internal references inside
computeNextVersions accordingly so the parameter names align with the renamed
variables used at the call site (previousBaseVersion, previousBaseRcVersion)
where computeNextVersions(basePrefix, previousBaseVersion,
previousBaseRcVersion, false) is invoked.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 87765533-57d6-4ca4-9e71-a7fd88727206

📥 Commits

Reviewing files that changed from the base of the PR and between 0b3869b and 6c8b617.

📒 Files selected for processing (2)
  • .github/scripts/publish-final-release.test.js
  • .github/scripts/release-versioning.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/scripts/publish-final-release.test.js

@fabianburth fabianburth merged commit 81fba63 into open-component-model:main Mar 31, 2026
16 checks passed
@fabianburth fabianburth deleted the chore/rename-versions branch March 31, 2026 06:55
fabianburth added a commit to fabianburth/open-component-model that referenced this pull request Mar 31, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
Highest Final Version and Final Version were quite hard to intuitively
understand without additional documentation. This PR introduces a
clearer naming scheme here.

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Contributes to
open-component-model/ocm-project#971
#### Testing

##### How to test the changes

<!--
Required files to test the changes:

.ocmconfig
```yaml
type: generic.config.ocm.software/v1
configurations:
  - type: credentials.config.ocm.software
    repositories:
      - repository:
          type: DockerConfig/v1
          dockerConfigFile: "~/.docker/config.json"
```

Commands that test the change:

```bash
ocm get cv xxx

ocm transfer xxx
```
-->

##### Verification

- [ ] I have tested the changes locally by running `ocm`

---------

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Co-authored-by: Jakob Möller <jakob.moeller@sap.com>
(cherry picked from commit 81fba63)
morri-son pushed a commit to morri-son/open-component-model that referenced this pull request Apr 15, 2026
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
Highest Final Version and Final Version were quite hard to intuitively
understand without additional documentation. This PR introduces a
clearer naming scheme here.

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Contributes to
open-component-model/ocm-project#971
#### Testing

##### How to test the changes

<!--
Required files to test the changes:

.ocmconfig
```yaml
type: generic.config.ocm.software/v1
configurations:
  - type: credentials.config.ocm.software
    repositories:
      - repository:
          type: DockerConfig/v1
          dockerConfigFile: "~/.docker/config.json"
```

Commands that test the change:

```bash
ocm get cv xxx

ocm transfer xxx
```
-->

##### Verification

- [ ] I have tested the changes locally by running `ocm`

---------

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Co-authored-by: Jakob Möller <jakob.moeller@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/github-actions Changes on GitHub Actions or within `.github/` directory kind/chore chore, maintenance, etc. size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants