Skip to content

Serve releases.json from GitHub Pages to fix publishing race#2527

Merged
bgilbert merged 1 commit intomesonbuild:masterfrom
bgilbert:pages
Mar 2, 2026
Merged

Serve releases.json from GitHub Pages to fix publishing race#2527
bgilbert merged 1 commit intomesonbuild:masterfrom
bgilbert:pages

Conversation

@bgilbert
Copy link
Copy Markdown
Collaborator

Meson fetches releases.json directly from the repo, via a redirect from wrapdb.mesonbuild.com. When a PR lands, releases.json is updated immediately but the GitHub release (with the wrap file, source mirror, and patch zip) is updated after a delay, which can be lengthy if CI is heavily loaded or down. During this time, meson wrap install and meson wrap update fail on the newly-updated wraps.

Maintain a second copy of releases.json that lags the one in Git, updating it only after all the releases it describes have been published. Publish it via GitHub Pages: have create_release.py generate a static site, then publish that in the release workflow. Because of how GitHub Pages works with custom domains, the new file will be available from https://mesonbuild.com/wrapdb/releases.json. Update the wrapdb.mesonbuild.com nginx config to redirect there instead.

While we're here, minify the published releases.json.

cc @tp-m

@bgilbert
Copy link
Copy Markdown
Collaborator Author

This requires one repo setting to be changed: the Pages deployment source must be GitHub Actions.

image

Making this change should automatically create a github-pages environment that only allows deployment from master, which is what we want.

@bgilbert bgilbert force-pushed the pages branch 2 times, most recently from 1cc1160 to 1944706 Compare November 27, 2025 04:49
@bgilbert
Copy link
Copy Markdown
Collaborator Author

This PR fixes a user-visible race condition in WrapDB infrastructure, but requires a repository admin to make the configuration change described in #2527 (comment). Could an admin, e.g. @eli-schwartz, please take a look?

@eli-schwartz
Copy link
Copy Markdown
Member

Done for GitHub Actions. I can't update the nginx config.

@bgilbert
Copy link
Copy Markdown
Collaborator Author

Yup, thanks. Will merge when I'm at a computer, confirm that it's working, and then the nginx config can be updated afterward.

Meson fetches releases.json directly from the repo, via a redirect from
wrapdb.mesonbuild.com.  When a PR lands, releases.json is updated
immediately but the GitHub release (with the wrap file, source mirror, and
patch zip) is updated after a delay, which can be lengthy if CI is heavily
loaded or down.  During this time, `meson wrap install` and
`meson wrap update` fail on the newly-updated wraps.

Maintain a second copy of releases.json that lags the one in Git, updating
it only after all the releases it describes have been published.  Publish
it via GitHub Pages: have create_release.py generate a static site, then
publish that in the release workflow.  Because of how GitHub Pages works
with custom domains, the new file will be available from
https://mesonbuild.com/wrapdb/releases.json.  Update the
wrapdb.mesonbuild.com nginx config to redirect there instead.

While we're here, minify the published releases.json.
@bgilbert bgilbert merged commit 0208011 into mesonbuild:master Mar 2, 2026
7 checks passed
@bgilbert bgilbert deleted the pages branch March 2, 2026 02:04
@bgilbert
Copy link
Copy Markdown
Collaborator Author

bgilbert commented Mar 2, 2026

Deployed successfully. @tp-m, could you please sync the nginx config when you get a chance?

@bgilbert
Copy link
Copy Markdown
Collaborator Author

@tp-m, ping, please sync the nginx config.

@tp-m
Copy link
Copy Markdown
Member

tp-m commented Mar 25, 2026

Sorry, missed the pings here. Best to ping me on IRC if you don't get a quick response :)

Should be deployed now.

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.

3 participants