Repository navigation
ci(docs): serialize update-docs runs and replay generated files on push races - #4401
Merged
Merged
Conversation
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the failing "Update docs to maps-docs repo" run https://github.com/rnmapbox/maps/actions/runs/40208044376. Three merges landed within ~2 minutes, so their runs raced on maps-docs. The losing run's
git pull --rebase -X ourshitCONFLICT (rename/rename)on the hashed Expo bundlestatic/example-app/_expo/static/js/web/index-<hash>.js. The rebase was never aborted, so every retry then failed with "Pulling is not possible because you have unmerged files".concurrencygroup withcancel-in-progress: true. Each run regenerates all docs from its own maps commit, so the newest main run supersedes older ones.static/example-appwith its own export as a whole. Hand edits to other maps-docs files are kept, and old hashed bundles don't build up. This still covers pushes to maps-docs from outside the group, such as manual PRs. Even without a conflict, the old-X oursrebase kept the upstream side, so the newer run's docs were silently dropped.expo exportalready empties its output dir, so a normal run doesn't leave stale bundles. maps-docs currently has a singleindex-*.js.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Component to reproduce the issue you're fixing
I tested the push step locally by extracting it from the workflow and running it against a local bare maps-docs repo. Two clones each export a differently hashed, near-identical bundle, so git detects renames. runA pushes first, then a hand edit lands on
src/pages, then runB runs.Before (current workflow): runB fails exactly like CI.
After: runB retries once and publishes. The result has only runB's bundle, index.html and docs, and the hand edit is kept.