Fix release-info action wiping manual _redirects entries#2060
Merged
Conversation
Contributor
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-2060.quarto.org |
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin prerelease
git worktree add -d .worktree/sync-2060-to-prerelease origin/prerelease
cd .worktree/sync-2060-to-prerelease
git switch --create sync-2060-to-prerelease
git cherry-pick -x 2e75f8e43ad0aa31007482c93f26cdf903ff6d4b |
cderv
added a commit
that referenced
this pull request
Jun 11, 2026
* Add mergeRedirects helper to preserve manual _redirects lines * Preserve manual _redirects entries when regenerating download links * Restore blog redirects lost to the _redirects overwrite (#2036) * Overwrite-sync generated downloads to prerelease instead of cherry-pick (cherry picked from commit 2e75f8e) # Conflicts: # _redirects
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.
Follow-up to #2036, which moved the Quarto blog to the Posit Open Source site and added 44 redirects so old
quarto.org/docs/blog/*URLs still resolve. Those redirects were silently wiped within 15 minutes and the old URLs have returned 404 since.Root Cause
The
release-infoaction regenerates_redirectson a 15-minute schedule and writes it with a full-file overwrite (.github/workflows/actions/release-info/index.js:184) containing only the generated download lines. The file has been entirely bot-generated since it was first created; #2036 was the first time manual content was placed in it, so the nextupdate-downloadsrun overwrote the blog redirects.The divergence then breaks propagation: the
main→prereleasegit cherry-pickinupdate-downloads.ymlconflicts on every run because the two branches'_redirectsno longer match, freezing the prerelease download links at an old version.Fix
release-infonow preserves every line outside the two namespaces it owns (/download/latest/,/download/prerelease/), regenerating only the download block. The merge is a small pure helper (merge-redirects.js) with unit tests._redirects.git checkout <main-sha> -- _redirects docs/download/*.json), so generated files reachprereleasewithout ever conflicting.Because scheduled workflows run the default-branch copy of the workflow file,
prereleaseself-repairs on the first cron run after this lands onmain— no manual branch surgery needed.