Skip to content

fix: make code-freeze next-version pre-release/dev tags configurable - #487

Merged
ko3n1g merged 1 commit into
mainfrom
ko3n1g/fix/code-freeze-prerelease-tags
Jun 3, 2026
Merged

fix: make code-freeze next-version pre-release/dev tags configurable#487
ko3n1g merged 1 commit into
mainfrom
ko3n1g/fix/code-freeze-prerelease-tags

Conversation

@ko3n1g

@ko3n1g ko3n1g commented Jun 3, 2026

Copy link
Copy Markdown
Contributor
Claude summary

Background / motivation

  • The bump-next-version job in _code_freeze.yml hardcoded NEXT_PRERELEASE=rc0 and NEXT_DEV=dev0.
  • Repos that moved to clean semver re-acquire an rc0 tag on main every freeze. Export-Deploy dropped rc0 in favor of dynamic git versioning (PRE_RELEASE = "", build: drop rc0 pre-release tag and add dynamic git versioning Export-Deploy#648), but the freeze bumped main back to 0.7.0rc0 — forcing a manual revert of the bump PR (Version bump to 0.7.0rc0.dev0 Export-Deploy#703, commit 9dde413).
  • Export-Deploy's package_info.py also has no DEV field, so dev0 only ever surfaced in the branch name / PR title / version output (0.7.0rc0.dev0) while the file said 0.7.0rc0 — a second inconsistency.

What changed

  • Add two optional inputs: next-pre-release (default rc0) and next-dev (default dev0).
  • Compose the next-version string conditionally so an empty next-dev doesn't leave a trailing ..

Details

  • .github/workflows/_code_freeze.yml:
    • New workflow_call inputs next-pre-release / next-dev — defaults preserve the current rc0/dev0 behavior, so no existing consumer is affected.
    • Wired into the bump-version step via the env: block (NEXT_PRERELEASE, NEXT_DEV) instead of hardcoded shell assignments.
    • NEXT_VERSION is built as MAJOR.MINOR.PATCH<pre> and .<dev> is appended only when next-dev is non-empty. Used for both the hatch __version__ rewrite and the version output.

Example

A clean-semver repo (no rc0, no dev field) opts in from its caller workflow:

jobs:
  code-freeze:
    uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_code_freeze.yml@vX.Y.Z
    with:
      library-name: NeMo-Export-Deploy
      python-package: nemo_export_deploy_common
      release-type: ${{ inputs.release-type }}
      next-pre-release: ""   # was forced to rc0 before
      next-dev: ""           # repo has no DEV field

Resulting next-version composition:

next-pre-release next-dev version
rc0 (default) dev0 (default) 0.7.0rc0.dev0
"" "" 0.7.0
rc0 "" 0.7.0rc0
"" dev0 0.7.0.dev0

Tested

  • Validated the four tag combinations above against the new shell composition logic — all produce correct PEP 440 strings; legacy default is unchanged.
  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/_code_freeze.yml'))" → valid YAML.

🤖 Generated with Claude Code

The bump-next-version job hardcoded NEXT_PRERELEASE=rc0 and NEXT_DEV=dev0,
re-introducing an rc0 tag on main for repos that moved to clean semver
(e.g. Export-Deploy dropped rc0 in favor of dynamic git versioning), forcing
a manual revert of the bump PR.

- Add `next-pre-release` (default `rc0`) and `next-dev` (default `dev0`) inputs
- Compose the version string conditionally so empty tags don't leave stray dots

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g
ko3n1g merged commit c6b8345 into main Jun 3, 2026
5 checks passed
@ko3n1g
ko3n1g deleted the ko3n1g/fix/code-freeze-prerelease-tags branch June 3, 2026 14:00
ko3n1g added a commit to NVIDIA-NeMo/Evaluator that referenced this pull request Jun 3, 2026
<details><summary>Claude summary</summary>

## Background / motivation

- Bring this repo's `release-freeze.yml` in line with the rest of the
NVIDIA-NeMo/* fleet on the latest tag of the shared `_code_freeze.yml`
reusable workflow.
- `v1.4.2` carries the fix that makes the bumped next-version
pre-release/dev tags configurable, so a code freeze no longer
re-introduces an `rc0` pre-release tag on clean-semver repos
(NVIDIA-NeMo/FW-CI-templates#487).

## What changed

- Bump `NVIDIA-NeMo/FW-CI-templates/.github/workflows/_code_freeze.yml`
from `v0.86.0` → `v1.4.2`.

## Details

- `.github/workflows/release-freeze.yml:37` — version pin updated.

## Tested

- N/A; manual workflow is exercised on `release-freeze` dispatch.

</details>

---------

Signed-off-by: oliver könig <okoenig@nvidia.com>
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