Repository navigation
Conversation
Add verwalter.toml and the four verwalter workflows (release PR, release, pre-release, changeset check). Remove the changesets/action job from CI, .changeset/config.json, the ci:publish script and the changesets devDependencies. Pending .changeset/*.md files carry over. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Run the release workflow for verwalter PRs on any base branch, so an rc PR from another branch is tagged and published. Remove the server SDK's changeset and ci:publish scripts. Let a failed docs build or upload fail the publish job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An rc release must not replace the docs of the current stable release. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| command: publish | ||
| releases: ${{ needs.release.outputs.releases }} | ||
|
|
||
| # The docs site holds one version: an rc must not replace it. |
There was a problem hiding this comment.
nitpick: an rc?
| # The docs site holds one version: an rc must not replace it. | |
| # The docs site holds one version: a rc must not replace it. |
There was a problem hiding this comment.
I kept "an rc". "rc" is said "ar-see", which starts with a vowel sound, so it takes "an".
xianshijing-lk
left a comment
There was a problem hiding this comment.
Reviewed the release workflows and validated the source/tag mismatch and docs guard with local fixtures against the pinned verwalter v0.30.0. Two correctness findings and one non-blocking concurrency suggestion are inline. No packages or documentation were published during validation.
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }} |
There was a problem hiding this comment.
[P1] Reject source/tag mismatches during manual recovery
A fresh manual dispatch on main checks out the branch's current SHA. If a failed publish left a release tag at commit A and the branch has advanced to B without another version bump, recovery can publish B's source under A's already-tagged version.
I validated this with the pinned verwalter v0.30.0: with the tag pointing to A and the same package version at B, both release --dry-run --package livekit-server-sdk and publish --dry-run accept the mismatch. The build steps here compile B before publishing.
Please reject a mismatch between the package's release tag and the checkout before building/publishing. Documenting recovery by re-running the original workflow or dispatching its original tag would also help operators choose the right source.
There was a problem hiding this comment.
Fixed in 59ed548.
- A run by hand takes a
refinput. All checkouts usemerge_commit_sha || inputs.ref || github.sha. - Before the build, the publish job fails if a package that this run publishes differs from its release tag. The check uses
git diff --quiet <tag> HEAD -- <package dir>. The error message namesref=<tag>. - The check covers only packages in
releases(or all, if the list is empty) that have a tag and are not on npm yet. Without that limit, a package that changed after its last release through aninternalPR would block every later release. - The comment on
workflow_dispatchnow says to use "Re-run failed jobs" first, and to run by hand only withrefset to the tag.
I tested the check with fixtures: it fails on a newer commit and passes at the tag. verwalter itself checks only that the tag exists, so I will also report this upstream.
There was a problem hiding this comment.
Update: I removed the guard step again in 10da6cd. The next verwalter release fixes this in publish itself (livekit/verwalter#105): it fails a package whose files changed since its tag, and the reason names ref=<tag>. I will bump the pin when that release is out. Until then, a run by hand must set ref to the release tag, as the comment in release.yml says.
| id: docs | ||
| run: | | ||
| version=$(node -p "require('./packages/livekit-server-sdk/package.json').version") | ||
| if [[ "$version" != *-* ]]; then echo "stable=true" >> "$GITHUB_OUTPUT"; fi |
There was a problem hiding this comment.
[P2] Restrict stable documentation deployment to the appropriate server SDK release
A stable version in this checkout does not establish that this run released the server SDK or that this branch contains the current stable documentation. An RTC-only prerelease on a maintenance branch can leave the server SDK at an older stable version and overwrite the single unversioned documentation destination.
I ran this guard against the server SDK manifest from the real [email protected] tag: it emits stable=true even with an RTC-only release handoff. Both documentation steps then run.
Please require an appropriate stable server SDK release in needs.release.outputs.releases and restrict this unversioned destination to the designated current release line. Other branches can skip deployment or use a versioned prefix; keep a way to retry a failed docs deployment.
There was a problem hiding this comment.
Fixed in 59ed548. The docs job now runs only when releases contains livekit-server-sdk with prerelease == false, and only for main (the base branch of the PR, or the branch of a run by hand). A release of rtc-node alone, an rc, or another branch skips it. To retry a failed docs upload, start a run by hand with package=livekit-server-sdk, which reports the package again.
| contents: write | ||
| id-token: write # trusted publishing | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
Non-blocking: serialize release workflows without dropping pending releases
Could we serialize the whole release workflow? An older run can fetch tags before a newer release exists, finish after it, and publish to latest. With two separate tag snapshots, I verified that the pinned verwalter chooses the default npm tag for both versions, so the older publish can move latest backwards.
A shared concurrency group with queue: max and cancel-in-progress: false would prevent overlapping release runs while retaining queued runs. cancel-in-progress: false alone still allows a newly queued run to replace an existing pending run. Queueing does not itself guarantee release-version order, but it removes the concurrent execution window.
The previous workflow also lacked serialization, so this is optional hardening rather than a regression introduced here.
There was a problem hiding this comment.
Partly fixed in d5e70d1, completed in 59ed548. The publish job has the group npm-publish with cancel-in-progress: false and now queue: max. Two publish jobs no longer run at the same time. A waiting publish job checks out only after the running one ends, so it sees the newer tag, and verwalter picks latest-1 for the older version. queue: max keeps every waiting run. I left the release job outside the group: it writes only tags and draft releases, and the order of the publish jobs decides the npm dist-tag.
xianshijing-lk
left a comment
There was a problem hiding this comment.
got some review comments from ai, maybe take a look ?
A docs failure no longer turns the publish job red after npm has the version. A publish job waits for a running one instead of publishing the same version twice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Add a ref input for runs by hand. Before the build, fail when a package to publish differs from its release tag. - Upload the server SDK docs only when this run released a final server SDK version from main. - Keep every waiting publish run with queue: max. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The next verwalter release checks in publish that each package matches its tag (livekit/verwalter#105). Until then, a run by hand sets ref to the tag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Releases run through
changesets/actionin thebuild_and_releasejob ofci.yml. That job runs on every push tomain, and it both commits to the release PR and publishes. This PR moves the release to verwalter. Verwalter keeps one release PR that it regenerates frommain, and it tags before it publishes. Tag names, versions and changelogs continue without a gap.Change
verwalter.tomllistspackages/*(livekit-server-sdk,@livekit/rtc-node), the version inpackage.json, the existing tag format{package}@{version}, and npm as the registry. Private examples are left out.release-pr.ymlkeeps the release PR open on each push tomain.release.ymltags and creates the GitHub releases after the release PR merges. Then it builds both packages and runspnpm publishper package with npm trusted publishing. The server SDK docs build and S3 upload move to the end of this job.pre-release.ymlopens an rc PR on demand.changeset-check.ymlfails a PR that changes a package without a changeset. Theinternallabel skips the check.build_and_releasejob fromci.yml,.changeset/config.json, theci:publishscript, and@changesets/cliwith@livekit/changesets-changelog-githubfrom bothpackage.jsonfiles.ci.ymlnow needs onlycontents: read..changeset/*.mdfiles use the same format, so pending changesets carry over. EveryCHANGELOG.mdstays, and new entries go on top.Different afterwards
mainwith its own changeset.Releaseworkflow. It skips versions that npm already has.Verified
verwalter plan: 2 packages, 0 pending changesets.verwalter status: both packages at the version of their last tag, with the GitHub release published and the version on npm.verwalter pr --dry-run: nothing to release.pnpm install --frozen-lockfilepasses with the updated lock file.pinact run --checkpasses on the new workflows.For maintainers
The PR cannot do these:
VERWALTER_RELEASE_CLIENT_IDandVERWALTER_RELEASE_APP_KEYsecrets for the verwalter GitHub App. Withgithub.token, the release PR does not trigger CI.release.ymlexpects the authorverwalter-release[bot]. Without the App, change that check togithub-actions[bot].internallabel, and add it to this PR. The PR changes only devDependencies of a package.release.yml, notci.yml.Not done yet
[check].apiwith break-check). That is a follow-up.🤖 Generated with Claude Code