Skip to content

fix(ci): pick previous release tag from all tags for changelog - #6066

Merged
kajalj22 merged 3 commits into
mainfrom
kajalj/release-previous-tag
Nov 12, 2026
Merged

kajalj22 merged 3 commits into
mainfrom
kajalj/release-previous-tag

Conversation

@kajalj22

Copy link
Copy Markdown
Contributor

Summary

  • Fix release.yaml choosing the whole repository history as the changelog range. Release tags (v0.1.0 through v0.7.0) are on branches that are not ancestors of main, so the shared release template's git describe --tags fallback finds no tag from a main or pull-request/* push, leaves fromTag empty, and builds a changelog for every PR ever merged.
  • Add a previous-tag job that lists all repository tags through the GitHub API and selects the highest stable semver tag, independent of branch ancestry. It is passed as gh-release-from-tag; a manual gh-release-from-tag dispatch input still overrides it.
  • On a manual dispatch, the previous tag is the one just below the version in nemo_gym/package_info.py, so a release is compared with the release before it, not the newest tag.
  • If the lookup fails, the release job is skipped and the run goes red, instead of silently falling back to the full history.

Stable vX.Y.Z tags only: rc tags are never picked as the previous release.

Why

The changelog body for the whole history is too large to pass as one command argument. Before the shared template moved the body into a file, this made the Create release step fail with Argument list too long, and main runs of this workflow were red from Nov 10 to Nov 12. The template fix (file-based body) is already pinned on main; this PR fixes the range itself, so release notes list the PRs since the previous release and stay small. The same change landed in NVIDIA-NeMo/RL.

No separate issue is needed for this focused CI repair.

Compatibility

CI workflow only. No runtime, package or config change. A main or pull-request/* run resolves v0.7.0 today; a manual dispatch behaves as before when gh-release-from-tag is set.

Validation

  • Ran the lookup script against the live tags API: main/pull-request/* pushes resolve v0.7.0; dispatch targets resolve v0.8.0 -> v0.7.0, v0.7.0 -> v0.6.0, v0.5.1 -> v0.5.0, v0.1.0 -> (empty).
  • release.yaml parses as valid YAML with jobs pre-flight, previous-tag, release, release-summary.
  • Model rollout: N/A, workflow-only change.

Test plan

  • release.yaml run on this PR's pull-request/* mirror is green and Build Changelog logs v0.7.0...<sha>
  • After merge, the release.yaml run on main is green with the same range
  • Dispatch release.yaml from main with dry-run: true and confirm the body lists only PRs since the previous release

🤖 Generated with Claude Code

Release tags live on branches that are not ancestors of main, so the
shared template's `git describe` fallback finds no tag from main or
pull-request/* pushes and builds a changelog covering the whole history.
That body exceeded the argument size limit and failed the Create release
step.

Add a previous-tag job that lists all repository tags through the GitHub
API and selects the highest stable semver tag, independent of branch
ancestry, and pass it as gh-release-from-tag. A manual gh-release-from-tag
dispatch input still overrides it. If the lookup fails, the release job is
skipped and the run goes red instead of silently widening the range.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
@kajalj22
kajalj22 requested a review from a team as a code owner November 12, 2026 16:36
@copy-pr-bot

copy-pr-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kajalj22

Copy link
Copy Markdown
Contributor Author

/review-approve

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test b004397

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 12, 2026 16:43
@kajalj22
kajalj22 enabled auto-merge November 12, 2026 16:46

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP WITH CARE

One RISK remains: supplying an explicit changelog tag still makes the release depend on automatic tag discovery succeeding.

I completed the changed-workflow review and traced the affected version metadata, release prerequisites and summary aggregation. Validation was static; I didn't execute tests or workflows, and the pinned external action and reusable workflow implementations weren't available for inspection.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

workflow_ref: 037094bcc9138c72bc125418e6e3653f9e1c4160 # pragma: allowlist secret

previous-tag:
runs-on: ubuntu-latest

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.

RISK — Bypass automatic discovery when an explicit tag is supplied.

For a valid manual dispatch with gh-release-from-tag=v0.6.0, a nonzero exit from gh api .../tags now fails previous-tag. Because release requires that job and checks !failure(), the release is skipped even though its changelog tag is already supplied. This adds an unnecessary failure dependency to the supported manual publishing path: the publishing procedure explicitly supplies that input.

Could previous-tag run only when no override is supplied? Replace this line with:

Suggested change
runs-on: ubuntu-latest
if: ${{ !inputs.gh-release-from-tag }}
runs-on: ubuntu-latest

The invariant is that an explicit tag doesn't depend on automatic discovery, while runs without an override still fail closed if discovery fails. Keep the existing input precedence and release condition: its status functions permit a deliberately skipped dependency, as already required for manual-dispatch pre-flight. This leaves tag selection and the docs/deployment exclusions unchanged. Please verify the suggestion before adopting it.

Proposed acceptance checks, not executed:

  • Dispatch with an explicit tag: previous-tag is skipped, no tags lookup runs, and the release call receives that exact tag.
  • Without an override, inject a nonzero tags lookup: previous-tag fails, release is skipped, and summary aggregation reports failure.
  • Retain successful automatic selection: stable tags v0.6.0 and v0.7.0 select v0.7.0 on a push and v0.6.0 for a dispatch targeting v0.7.0; prerelease tags remain excluded. Docs/deployment exclusions must still skip the release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in f7f3d63: previous-tag now has if: ${{ !inputs.gh-release-from-tag }}, so a manual dispatch that supplies the tag skips the tags lookup and the release receives that exact tag. Runs without an override still run the lookup, and release is skipped and the run goes red if it fails. The existing release condition is unchanged; a skipped previous-tag is not a failure, the same as pre-flight on dispatch. Thanks for the suggestion.

…us-tag

Keep the previous-tag lookup for gh-release-from-tag and drop the
pull-request comparison with the default branch.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 0939c62

A manual dispatch that passes gh-release-from-tag no longer depends on the tags lookup. Runs without an override still fail closed if the lookup fails.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test f7f3d63

@kajalj22

Copy link
Copy Markdown
Contributor Author

/review-approve reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP

LGTM — no concerns found.

I completed the full changed-workflow review, including tag selection, dispatch version metadata, release prerequisites, and summary aggregation. The prior RISK is fixed: the job condition skips discovery when an explicit tag is supplied, while the release input retains override precedence and blocks release after a discovery failure.

Validation was static; I didn't execute tests or workflows. The pinned external action and reusable workflow implementations weren't available for inspection.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@kajalj22
kajalj22 added this pull request to the merge queue Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43274520668

@yaoyu-33
yaoyu-33 requested a review from ananthsub November 12, 2026 18:04
Merged via the queue into main with commit 5d22439 Nov 12, 2026
70 of 73 checks passed
@kajalj22
kajalj22 deleted the kajalj/release-previous-tag branch November 12, 2026 18:12
yaoyu-33 added a commit that referenced this pull request Nov 12, 2026
Take main's release.yaml: #6066 starts the changelog at the previous
release tag for main and pull-request pushes, which replaces this
branch's PR-only workaround. Keep Droid beside DeepAgents in
AGENT_SESSION_AGENT_TYPES and the harness tables.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
khazic pushed a commit to khazic/Gym-lao that referenced this pull request Nov 15, 2026
… keep the relay configs as *_legacy_agent (NVIDIA-NeMo#5762)

* feat(swe): add OpenCode agent-session configs for SWE-bench and SWE training sets

SWE-bench, SWE-bench Pro, SWE-Gym, R2E-Gym and Scale-SWE already serve
typed resources sessions and lend their task sandbox through
sandbox_access, but their OpenCode configs still reach
opencode_sandboxed_agent through the legacy_agent relay.

Add a single_agent_turn config beside each of them: SWE-bench Verified,
Multilingual and Pro recipes, and SWE-Gym, R2E-Gym and Scale-SWE
training configs. Each routes its taskset to an Environment Server that
seeds the resources session, lends the sandbox to an opencode_agent
session, verifies after the agent closes, and closes both sessions. The
training configs turn on the agent's token_id_capture, as
opencode_sandboxed_agent does by default, and drop the golden-patch
resources instance they do not use.

The relay configs stay unchanged, because the Nemotron 3.5 Super
recipes and their tests bind them and the two OpenCode adapters use
different defaults.

Each config has a binding test that resolves it and validates a
materialized example row against the server's seed task model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* docs(swe): recommend the single_agent_turn configs and mark the relay configs deprecated

The opencode.yaml recipes of SWE-bench Verified, Multilingual and Pro, and
the SWE-Gym, R2E-Gym and Scale-SWE opencode configs, run
opencode_sandboxed_agent through the legacy_agent relay. That agent is
already deprecated and will be removed after the Environment Server
migration.

Say so at the top of each relay config and in the READMEs, and point to
the opencode_single_agent_turn configs instead. The SWE-bench README now
shows the session recipe in its example. The relay recipes stay to
reproduce existing results, such as the Nemotron 3.5 Super recipes.

The opencode_agent README still lists its session path as evaluation
only, so the training configs and READMEs now ask to check token capture
before training on those rollouts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* test(swe): drop the binding tests of the session configs

The configs are checked by gym env validate and the real pairing runs;
separate unit tests for each config are not needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* refactor(swe): give the session configs the opencode names and rename the relay configs

The benchmark and environment are already in the path, so the
single_agent_turn configs take the plain names:
benchmarks/swebench/{verified,multilingual,pro}/opencode.yaml and
resources_servers/{swe_gym,r2e_gym,scale_swe}/configs/*_opencode.yaml.

Configs can be referenced and extended elsewhere, so the relay configs
are renamed instead of removed: opencode_legacy_agent.yaml and
*_opencode_legacy_agent.yaml, after the legacy_agent environment server
they run behind. Their instance names do not change.

Every citation of the relay recipes now uses the new paths: the
Nemotron 3.5 Super eval, suite and SGLang configs and README, the
nemotron_recipes/super-3.5 SWE-bench recipes, and the tests that pin
those suites and the relay bindings. Each SWE-bench recipe keeps a
manifest: the relay manifests move to opencode_legacy_agent/ with
lifecycle deprecated, and opencode/ now describes the session recipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(ci): scope release rehearsal changelogs to PR changes

Signed-off-by: yaoyu-33 <[email protected]>

* ci(release): drop this PR's release changelog change

main's previous-tag fix (NVIDIA-NeMo#6066) already starts the changelog from the
previous release tag, so this PR no longer changes release.yaml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* chore: refresh the pull request after an interrupted push

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>

* fix(opencode): isolate the deprecated local episode entry point

Signed-off-by: yaoyu-33 <[email protected]>

* fix(opencode): preserve local recipe episode routing

Select the compatibility entry point for the two shipped local recipes and exercise their configured HTTP routes. Keep the discovery assertion strict while including the new legacy variant.

Signed-off-by: yaoyu-33 <[email protected]>

---------

Signed-off-by: yaoyu-33 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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