Repository navigation
ci: keep npm's latest on the newest release when publishing from a release branch - #3479
Conversation
…lease branch From the #3223 review. Changesets tags every publish latest, so a maintenance release from release/<line> after a newer release would move latest back to the older line. It now keeps latest only when every package it publishes is newer than that package's latest, and otherwise publishes under release-<line>. The Release workflow's concurrency group is also per branch now: a single group let a push to main replace a maintenance release still waiting to run.
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
|
✅ agents import sizes: no significant changes ( |
| # One group per branch: a pending run is replaced by the next push to the | ||
| # same branch, so a push to main must not replace a pending maintenance | ||
| # release. | ||
| group: ${{ github.workflow }}-${{ github.ref }} |
There was a problem hiding this comment.
🔍 Prior approval for CI changes
The CI change policy requires prior approval for changes to Release workflow scheduling.
Was this helpful? React with 👍 or 👎 to provide feedback.
From the Devin review of #3479. The tag check read only packages/*, but Changesets also publishes voice-providers/*; it now lists the pnpm workspace. And per-branch groups let main publish between a maintenance run's latest check and its publish, so the Release workflow is back to one group, with queue: max so a push to main waits instead of replacing a pending maintenance run.
…lease branch (#3479) (#3510) * ci: keep npm's latest on the newest release when publishing from a release branch From the #3223 review. Changesets tags every publish latest, so a maintenance release from release/<line> after a newer release would move latest back to the older line. It now keeps latest only when every package it publishes is newer than that package's latest, and otherwise publishes under release-<line>. The Release workflow's concurrency group is also per branch now: a single group let a push to main replace a maintenance release still waiting to run. * ci: check every workspace package and queue release runs in one group From the Devin review of #3479. The tag check read only packages/*, but Changesets also publishes voice-providers/*; it now lists the pnpm workspace. And per-branch groups let main publish between a maintenance run's latest check and its publish, so the Release workflow is back to one group, with queue: max so a push to main waits instead of replacing a pending maintenance run. (cherry picked from commit 5876f38)
A maintenance release from a
release/**branch publishes under npm'slatesttag, just like a release from main. So once 0.35.0 ships, a 0.34.2 fromrelease/0.34would takelatestback, andnpm install agentswould install the older line. Now a release branch keepslatestonly when everything it publishes is newer than the currentlatest. Otherwise it publishes underrelease-<line>.The Release workflow also had one concurrency group that kept only one pending run, so a push to main could replace a maintenance release still waiting to run. That release would never publish. The group now queues (
queue: max), so each run waits its turn. It stays one group for main andrelease/**, so a main release can't publish between a maintenance run's check oflatestand its own publish.Both came up in the Devin review of #3223.
Summary
concurrency: group: ${{ github.workflow }} cancel-in-progress: false + queue: maxIf npm fails with anything other than "not found", the publish stops rather than guessing a tag. Changesets applies one tag to the whole run, so if any package in it is older than its
latest, the whole run gets the maintenance tag.Evidence
A dry run of the script, with publishing stubbed out and a package's version changed:
mainchangeset publish(latest)release/0.34changeset publish(latest, nothing to publish)release/0.34latest0.34.1)changeset publish(latest)release/0.34latest)changeset publish --tag release-0.34release/0.34latest0.1.1)changeset publish --tag release-0.34release/0.34changeset publish(latest)It hasn't run in Actions yet. The first real proof will be the next maintenance release.
Merge Danger
Door: two-way
Blast Radius: releases
Releases from main are unchanged. A release from a
release/**branch now runsnpm viewfor each package first. Releases from main andrelease/**still run one at a time; a run now waits behind a running one instead of replacing a pending one.The workflow runs from the pushed branch, so
release/0.34keeps the old behaviour until this is cherry-picked there.