Repository navigation
Wait for new Ghost version on npm before committing/opening upstream PR - #488
Conversation
The ghost-version-publish dispatch can fire before the new version is installable from npm, and the Ghost-CLI images run "ghost install" against npm at build time, so both this repo's CI and the official-images PR checks were failing on the race. Poll the registry (abbreviated and full packuments, plus the tarball) for up to 30 minutes before pushing anything.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 3 remain after this review. WalkthroughThe update workflow adds a pre-push check for Ghost versions with CLI pins. When the workflow is not a dry run and either Dockerfiles changed or pull request creation is enabled, it checks both npm packument formats and the listed tarball URL. Checks repeat every 30 seconds. The step fails if availability is not confirmed within 30 minutes. Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The availability check is ready to merge after normal workflow checks; neither reported concern establishes a failure that would block a valid update or allow an unavailable package through. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
The
ghost-version-publishdispatch can arrive before the new Ghost version is installable from npm. The Ghost-CLI images (6) runghost install <version>against npm at build time, so both this repo's CI (kicked off by the pushed commit) and the official-images PR checks regularly fail on that race.Change
Adds a Wait for Ghost on npm step to
update.yml, ahead of Commit and push changes:versions.jsonentry with a.clipin, pollsregistry.npmjs.org/ghostuntil the version shows up in both the abbreviated (application/vnd.npm.install-v1+json) and full packuments (cached independently), then confirms the tarball responds.Cache-Control: no-cache, polls every 30s, gives up after 30 minutes.6-nextinstalls from the GitHub release tarball, whichversions.shalready waits for, so it isn't checked.Check logic was tested locally against the live registry (passes for
6.68.0, keeps waiting on a nonexistent6.999.0); the workflow itself hasn't run in Actions yet.