Skip to content

fix: use a fresh UUID instead of run_id for preview publish versions - #841

Merged
jinglongchenTS merged 1 commit into
masterfrom
ci/preview-publish-uuid-version
Aug 20, 2026
Merged

fix: use a fresh UUID instead of run_id for preview publish versions#841
jinglongchenTS merged 1 commit into
masterfrom
ci/preview-publish-uuid-version

Conversation

@jinglongchenTS

Copy link
Copy Markdown
Contributor

Summary

github.run_id stays the same across re-runs of the same workflow run (only github.run_attempt changes). If a run reaches the publish step and succeeds, but a later step fails, re-running it recomputes the identical 0.0.0-<run_id> version and collides with what the earlier attempt already published.

Observed for real on a npm publish pager run on #839/#840 today (run 32344017177, attempt 2 of 2) — attempt 1 happened to fail before reaching the publish step, so no collision occurred that time, but the risk is real for any run that fails later.

Switches to a UUID generated fresh via uuidgen on every execution, which has no such collision risk regardless of why or how many times the job is retried. README.md updated to match (0.0.0-<run id>0.0.0-<uuid>).

Test plan

  • YAML validity checked locally
  • 0.0.0-$(uuidgen) produces valid semver (checked with the semver package)
  • Not exercised end-to-end in Actions — same as prior PRs in this series, needs to land on master to be testable via a real npm publish comment

github.run_id stays the same across re-runs of the same workflow run,
so a run that fails after publishing (but before finishing) would
collide with itself on retry.
@jinglongchenTS
jinglongchenTS requested review from a team as code owners August 20, 2026 07:42
@upwind-code-us

upwind-code-us Bot commented Aug 20, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

0 newly introduced vulnerabilities · 0 resolved · 0 total in this PR vs master

View full analysis in Upwind Console

Scan completed in 16s

Scan history (1 scan)
Commit Scanned at New Resolved Net
8542f16 < 2026-08-20 07:42 UTC 0 0 0

Last scanned: 8542f16 · 2026-08-20 07:42 UTC

@upwind-code-us

upwind-code-us Bot commented Aug 20, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Proceed with Deployment

0 newly introduced misconfigurations · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console →

Scan completed in 6s

Scan history (2 scans)
Commit Scanned at New Resolved Net
8542f16 2026-08-20 07:42 UTC
8542f16 < 2026-08-20 07:42 UTC 0 0 0

Last scanned: 8542f16 · 2026-08-20 07:42 UTC

@ts-sonarqube

ts-sonarqube Bot commented Aug 20, 2026

Copy link
Copy Markdown

@jinglongchenTS
jinglongchenTS merged commit f6e68d9 into master Aug 20, 2026
4 checks passed
@jinglongchenTS
jinglongchenTS deleted the ci/preview-publish-uuid-version branch August 20, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants