Repository navigation
fix(ci): choose a release's dist-tag when it publishes, and move next after it - #3794
Open
armando-navarro wants to merge 2 commits into
Open
armando-navarro wants to merge 2 commits into
armando-navarro wants to merge 2 commits into
Conversation
… after it A stable tag published to latest unconditionally, so a 20.x release tagged after 21.0.0 would move latest back to 20.x. A stable release now goes to latest only when it ranks above npm's latest and every other stable git tag, since a higher release can still be in npm's publish-time malware scan. Otherwise it goes to v<major>-lts, and the job fails if it does not rank above that tag or another release of its major. Every publish now waits until npm lists it, in one npm-publish queue, so the next publish reads the real dist-tags. That stops a queued canary from reading a stale canary tag. After a release reaches latest, next moves up to it, and a failure there prints the npm dist-tag command that finishes it. A re-run of a published release skips npm publish and goes on to the wait and the next move. The steps live in tools/publish-job.js and tools/release-tag.js so specs cover them, and build.sh no longer picks a tag.
The check that skips a canary of an earlier commit keeps the same decisions and messages, and its specs now cover each branch. It runs only for pushes and scheduled runs, and a failed read of npm's dist-tags now says why.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3790
Fixes #3791
The publish job now picks a release's dist-tag when it publishes, moves
nextup after a stable release, and waits until npm lists each publish before the next one starts.Changes
The first commit moves the publish job's new steps into
tools/publish-job.jsand the version rules intotools/release-tag.js, each with a spec.latestonly if it ranks above npm'slatestand every other stable git tag. Git tags count because a higher release can still be in npm's publish-time scan.v<major>-lts, the name Angular uses for its own older majors.v<major>-lts, or above another stable release of its own major.next, as before.npm publish, the job polls npm's dist-tags every 15 seconds for up to 20 minutes.npm-publishconcurrency group, so the next publish starts only after the wait.latest, the job fails and prints the command that movesnext.next.latest, the job runsnpm dist-tag add @angular/fire@<version> nextthrough the publishing proxy whennextis lower.npm publishand continues with the wait and thenextmove.tools/build.shonly sets the version now. The publish step passes the tag tonpm publish, sopublish.shis gone.The second commit moves the existing canary check from #3784 into
tools/publish-job.js, with the same decisions and messages, and runs it only for pushes and scheduled runs.Behavior to know
20.1.xneeds this change before its next release, or that release still publishes tolatest. A separate PR will bring it there.20.0.xgets no further releases.nextmove has not run for this repository before. The first release after this merges is its first real run. If it fails, the job prints the command to run by hand.next, even below its current value.canary-publishtonpm-publish, so a canary still queued under the old name when this merges is not ordered with the first run under the new one.Verification
npm run test:node: 381 specs, 0 failures. The new specs cover:semverover 50 version pairsgitand$GITHUB_OUTPUTcalls, against a local repositorymainand on releases.