Skip to content

feat(release): publish release candidates from vX.Y.Z-rcN tags - #4856

Merged
kovtcharov-amd merged 1 commit into
amd:mainfrom
kovtcharov:kalin/release-candidates
Oct 6, 2026
Merged

kovtcharov-amd merged 1 commit into
amd:mainfrom
kovtcharov:kalin/release-candidates

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

Today the only way to test a release before users get it is a CI artifact that needs admin access and expires in a week. With this change a vX.Y.Z-rcN tag publishes a real release candidate that anyone can install from GitHub, pip, npm, or a small collapsed entry on the website. Nothing changes for users who don't ask for it. A final vX.Y.Z tag runs the same jobs and publishes the same artifacts as before; the RC behaviour only switches on for -rcN tags.

What an RC tag does differently (same approval gate):

  • GitHub: the release is a pre-release and never "latest". It carries the desktop installers, the terminal binaries, and the wheel and sdist.
  • PyPI: publishes X.Y.ZrcN, which plain pip install amd-gaia skips. npm: publishes @amd-gaia/[email protected] under next, so latest doesn't move.
  • Version: version.py stays X.Y.Z and the RC suffix is added from the tag at build time. That means the final can be tagged on the RC's own commit with no second version bump.
  • Release notes: an RC reuses the final's docs/releases/vX.Y.Z.mdx. The validator accepts -rcN tags; finals are checked as strictly as before.
  • Website: shows "Try the release candidate" (collapsed, below the stable downloads) only while the RC is newer than the latest stable release.
  • Skipped: Context7 refresh, the release branch update, and Agent Hub R2. The hub catalog has no pre-release channel and picks the highest version, so publishing an RC there would make it the default download.

Not in this PR:

  • One-step Windows setup and terminal .pkg/.deb/.rpm packages: not built for RCs. They need a numeric-only version (NSIS, rpm), and changing their build scripts right before tonight's release was too risky.
  • @amd-gaia/gaia on npm: releases on its own agent-pkg-gaia-* tags and pulls its terminal binary from R2, so it can't ship an RC until R2 has a channel. Both are follow-ups.

Test plan

Dry-run tag classification (python util/release_tag.py classify <tag>):

Tag Result PyPI npm (dist-tag) Notes file
v0.25.0 final 0.25.0 0.25.0 (latest) v0.25.0.mdx
v0.15.4.1 final 0.15.4.1 0.15.4.1 (latest) v0.15.4.1.mdx
v0.25.0-rc1 RC 0.25.0rc1 0.25.0-rc.1 (next) v0.25.0.mdx
v0.25.0-rc12 RC 0.25.0rc12 0.25.0-rc.12 (next) v0.25.0.mdx
v0.25.0-rc.1, v0.25.0rc1, v0.25.0-rc0, v0.25.0-beta1 rejected in validate
  • python -m pytest tests/unit -k "release or version or docs_json or publish or workflow": 737 passed. Includes the new tests/unit/test_release_tag.py, which covers classification, stamping, the validator, and the workflow wiring (including which workflows an RC tag starts).
  • npx jest backend-installer in tests/electron: 48 passed. An RC app pins amd-gaia==X.Y.ZrcN, and a final app upgrades an RC backend instead of keeping it.
  • npx vitest run in website/: 247 passed. npm run build with the live catalog shows no RC entry, which is correct since no RC exists.
  • actionlint: 0 errors on the four changed workflows. python util/lint.py --black --isort is clean.
  • The RC release-body script, run locally against a copy of the notes, produces the banner, the RC install lines, and no leftover placeholders.
  • First real v0.25.0-rc1 run: pre-release created, PyPI 0.25.0rc1, npm view @amd-gaia/agent-ui dist-tags shows latest unchanged, and no Publish Hub Components (R2) run.

Fixes #4845

A release could only be tested from a CI artifact that needs admin access and
expires in a week. A vX.Y.Z-rcN tag now runs the same publish pipeline, behind
the same approval, and lands on pre-release channels only: a GitHub
pre-release, PyPI X.Y.ZrcN, and npm X.Y.Z-rc.N under the `next` dist-tag. The
website offers it in a collapsed entry under the stable downloads while it is
newer than the latest release. A vX.Y.Z final takes the same path as before.

- util/release_tag.py classifies the tag and stamps the RC version at build
  time, so version.py stays X.Y.Z and the final can reuse the RC's commit.
- Agent Hub R2 publishing is skipped for RCs: the catalog has no pre-release
  channel and would serve an RC as the latest version.
- The desktop app keeps the rc suffix when it reads the installed backend's
  version, so a final app upgrades an RC backend instead of keeping it.

Fixes amd#4845
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes tests Test changes website GAIA website (amd-gaia.ai) labels Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

A vX.Y.Z-rcN tag now publishes a real release candidate: a GitHub pre-release, a PyPI rcN that plain pip install skips, and npm under next. The RC also stays out of the Agent Hub catalog and the release branch. Final tags take the same path as before. The wiring is careful and well tested, and I found nothing that would leak an RC onto a stable channel.

One small thing to fix before the first RC goes out:

  • The RC desktop app shows the "installing GAIA" window on every launch. The app's quick "backend is already installed" check compares the npm spelling of the version (0.25.0-rc.1) with the pip spelling (0.25.0rc1). They never match, so the progress window always opens. The slower check behind it gets this right, so nothing is reinstalled, but testers will see the window flash on every launch. It's a one-line fix (below).

Real-world evidence

N/A: release tooling, CI workflows, and docs. No evidence bundle was produced for this PR. The new classify/stamp logic is covered by unit tests, and the PR description has a dry-run table for release_tag.py classify. The pipeline itself (pre-release creation, PyPI rc1, npm next, website entry) can only be proven by the first real v0.25.0-rc1 tag, which the test plan already lists as unchecked. This verdict rests on static review of that path.

🔍 Technical details

🟡 Desktop fast-path never matches for an RC (src/gaia/apps/webui/main.cjs:757)
bootstrapBackend() compares getInstalledVersion() (now 0.25.0rc1) with the raw pkg.version (0.25.0-rc.1). This PR fixed the same comparison in ensureBackend() with toPep440() but missed this one. Every RC launch falls through to the progress window. ensureBackend() then returns without reinstalling. The new Jest tests cover ensureBackend, not this path.

    if (installedVersion && installedVersion === backendInstaller.toPep440(expectedVersion)) {

🟢 gaia-ui --help prints the npm spelling as a pip pin (src/gaia/apps/webui/bin/gaia-ui.cjs:76)
An RC's help text reads amd-gaia[ui]==0.25.0-rc.1. pip normalizes that, so it isn't broken, but it no longer matches what the installer actually pins. You could use toPep440(pkg.version) here too.

🟢 The RC npm publish is never checked afterwards (.github/workflows/publish.yml, publish-npm)
"Verify publication" is skipped for an RC, and the RC step only echoes. A npm view @amd-gaia/agent-ui dist-tags assertion (next == NPM_VERSION, latest unchanged) would turn the last unchecked test-plan item into a pipeline gate.

🟢 The publish_agents.yml tag trigger is unfiltered
It still triggers on v* and so runs for RC tags. That's harmless today because its publish jobs are hard-gated with false &&. Consider adding the same '!v*-rc*' exclusion now, so re-enabling publishing later doesn't silently include RCs.

Strengths

  • One source of truth (util/release_tag.py) feeds every job. It refuses a final tag and refuses a tree without the release bump, so the "tag before the bump landed" mistake fails loudly instead of publishing a mismatched version.
  • Keeping version.py at X.Y.Z and stamping the suffix at build time means the final is tagged on the tested RC commit, so no second bump commit lands between test and ship.
  • The workflow-wiring tests (tag filters, next dist-tag, prerelease/make_latest, no Context7 refresh for an RC) guard regressions that would otherwise only show up when someone pushes a tag.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 6, 2026
Merged via the queue into amd:main with commit c4daa37 Oct 6, 2026
@kovtcharov-amd
kovtcharov-amd deleted the kalin/release-candidates branch October 6, 2026 01:47
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 7, 2026
…ut from (amd#4868)

On a release candidate, the command GAIA prints to install or repair an
agent names a git tag that doesn't exist, so following it fails. Since
amd#4588 the command pins to `v<installed core version>`; an RC installs as
`0.25.0rc1` but is tagged `v0.25.0-rc1` (amd#4856). The pin now uses the
tag the core was actually released from, and a dev build, which has no
tag, keeps tracking trunk. Final releases are unchanged.

This needs to be in before the first `v0.25.0-rc` tag, or every RC
tester who needs the chat or flagship agent is handed a command that
errors.

## Test plan
- [x] `pytest tests/unit/agents/test_install_hints.py` — 39 passed;
covers final, four-part, RC and dev versions, and checks the RC mapping
against `util/release_tag.py` so the two can't drift
- [x] `pytest tests/unit -k "install_hint or not_installed or
source_install or release_tag"` — 95 passed
- [ ] On an RC install with no agent wheel, `gaia chat` prints a command
ending in `@v0.25.0-rc1#subdirectory=…` and that command installs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes documentation Documentation changes tests Test changes website GAIA website (amd-gaia.ai)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release pipeline: publish release candidates as well as final releases, with a low-key RC download on the website

2 participants