Skip to content

Commit 485145e

Browse files
committed
Serialize request-converter npm publishes
Release branches are tagged within seconds of each other and each release publishes the same npm package. npm rewrites the whole packument on publish, so the later run fails with "409 Conflict - Failed to save packument". 8.19.25 lost that race against 9.5.1 and published nothing. A concurrency group serializes the runs. "queue: max" is required because the default single pending slot cancels an already-pending run when a third arrives, which would silently drop a publish in a three-release cluster.
1 parent 3bc794b commit 485145e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/request-converter-npm-publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ permissions:
1818
contents: read
1919
id-token: write
2020

21+
# npm rewrites the whole packument on publish, so two releases publishing this package
22+
# seconds apart make the loser fail with E409. Release branches are tagged together, so
23+
# the publishes have to be serialized. "queue: max" holds a later run rather than
24+
# cancelling it, which the default single pending slot would do.
25+
concurrency:
26+
group: request-converter-npm-publish
27+
queue: max
28+
cancel-in-progress: false
29+
2130
jobs:
2231
publish:
2332
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)