Skip to content

fix: handle race condition in release promote job#115

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

fix: handle race condition in release promote job#115
AaronFeledy merged 1 commit intomainfrom
fix/release-promote-race

Conversation

@AaronFeledy
Copy link
Member

@AaronFeledy AaronFeledy commented Feb 22, 2026

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
Workflow-only change that adds a bounded retry and clearer failure mode; main risk is delayed/failed releases if npm propagation is slower than the 5-minute window.

Overview
Prevents the promote GitHub Actions job from racing the deploy publish by waiting for the released package version to appear on npm before running npm dist-tag add ... latest.

Adds a retry loop (up to 5 minutes) with progress logging, and fails the job with a clear error if the version never becomes available, instead of attempting the tag update immediately.

Written by Cursor Bugbot for commit fd052e1. 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
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for lando-node ready!

Name Link
🔨 Latest commit fd052e1
🔍 Latest deploy log https://app.netlify.com/projects/lando-node/deploys/699b6da5ef762e0008d67ef6
😎 Deploy Preview https://deploy-preview-115--lando-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 89 (🔴 down 4 from production)
Accessibility: 98 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@AaronFeledy AaronFeledy merged commit 24202a9 into main Feb 27, 2026
20 of 21 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