Skip to content

fix: handle race condition in release promote job - #60

Merged
AaronFeledy merged 1 commit into
mainfrom
fix/release-promote-race
Feb 27, 2026
Merged

AaronFeledy merged 1 commit into
mainfrom
fix/release-promote-race

Conversation

@AaronFeledy

@AaronFeledy AaronFeledy commented Feb 22, 2026 •

Copy link
Copy Markdown
Member

Problem

When a fresh (non-prerelease) release is created, GitHub fires both published and released events simultaneously. The promote job (triggered by released) races the deploy job (triggered by published) and tries to npm dist-tag add before the package is published to npm.

Fix

Add a retry loop that waits up to 5 minutes for the package version to appear on npm before promoting. If the version never appears, the job fails with a clear error instead of silently succeeding.

This is better than simply skipping when the version doesn't exist (as in lando/phpmyadmin#72), because it still catches genuine failures — e.g., if a prerelease promotion runs and the version is truly missing.

Affected repos

This same fix is being rolled out to all Lando repos with this release workflow pattern.

Closes any race condition failures on the promote job.


Note

Low Risk
Small CI-only change that just adds polling and clearer failure behavior around npm dist-tag promotion.

Overview
Prevents the release promote workflow from racing the npm publish by waiting up to 5 minutes for npm view $PACKAGE@$VERSION to succeed before running npm dist-tag add ... latest.

If the version never becomes available, the job now fails explicitly with a clear error message instead of attempting the promotion immediately.

Written by Cursor Bugbot for commit c8680a2. This will update automatically on new commits. Configure here.

When a fresh non-prerelease is published, GitHub fires both 'published'
and 'released' events simultaneously. The promote job races the deploy
job and fails because the package isn't on npm yet.

Add a retry loop (up to 5 min) so promote waits for the package to
appear, while still failing loudly if it never does.
@netlify

netlify Bot commented Feb 22, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for lando-mongo failed. Why did it fail? →

Name Link
🔨 Latest commit c8680a2
🔍 Latest deploy log https://app.netlify.com/projects/lando-mongo/deploys/699b6d809cdae9000850e127

@AaronFeledy
AaronFeledy merged commit 4c9b61d into main Feb 27, 2026
20 of 24 checks passed
@AaronFeledy
AaronFeledy deleted the fix/release-promote-race branch February 27, 2026 05:47
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.

1 participant