Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

ci(release): never cancel a canary that has started publishing (#9085)

Cindy Zhangeaae8e3c101c
diff --git a/.github/scripts/release-publish-workflow.test.mjs b/.github/scripts/release-publish-workflow.test.mjs
index 0f521092ff..f6fb3c4cbb 100644
--- a/.github/scripts/release-publish-workflow.test.mjs
+++ b/.github/scripts/release-publish-workflow.test.mjs
@@ -101,6 +101,16 @@ describe('stable and canary publication authority', () => {
expect(publish.indexOf('if [ "$DRY_RUN" = "true" ]')).toBeLessThan(verify);
});
+ it('never cancels a canary that has started publishing', () => {
+ // A cancelled canary can leave a partial package set on npm; pending runs
+ // still coalesce under a non-cancelling group.
+ expect(canary.concurrency).toEqual({
+ group: 'npm-release-canary',
+ 'cancel-in-progress': false,
+ });
+ expect(canary.concurrency.group).not.toBe(stable.concurrency.group);
+ });
+
it('publishes canaries only while main is strictly ahead of stable', () => {
const eligibility = step(
canary,
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5799d619e8..c17de096c0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -198,12 +198,15 @@ jobs:
name: Publish canary to npm
if: github.event_name == 'push'
runs-on: ubuntu-latest
- # Dedicated group, cancel-in-progress so a newer main push supersedes an
- # in-flight canary. Independent of the stable group, so this can never
- # cancel or starve a stable dispatch.
+ # Dedicated group, independent of the stable group, so this can never
+ # cancel or starve a stable dispatch. Never cancel in progress: a canary
+ # that has started may already have published some packages, and
+ # cancelling it mid-loop leaves a partial canary set on npm. Bursts still
+ # coalesce: while one canary runs, a newer push waits as the single pending
+ # run, and a later push replaces that pending run before it starts.
concurrency:
group: npm-release-canary
- cancel-in-progress: true
+ cancel-in-progress: false
permissions:
contents: read
id-token: write # required for npm OIDC trusted publishing + provenance