Skip to content

Fix release-info action wiping manual _redirects entries#2060

Merged
cderv merged 4 commits into
mainfrom
fix-redirects-wipe
Jun 11, 2026
Merged

Fix release-info action wiping manual _redirects entries#2060
cderv merged 4 commits into
mainfrom
fix-redirects-wipe

Conversation

@cderv

@cderv cderv commented Jun 11, 2026

Copy link
Copy Markdown
Member

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-info action regenerates _redirects on 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 next update-downloads run overwrote the blog redirects.

The divergence then breaks propagation: the mainprerelease git cherry-pick in update-downloads.yml conflicts on every run because the two branches' _redirects no longer match, freezing the prerelease download links at an old version.

Fix

  • release-info now 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.
  • Restore the 44 blog redirects to _redirects.
  • Replace the cherry-pick with an overwrite-sync (git checkout <main-sha> -- _redirects docs/download/*.json), so generated files reach prerelease without ever conflicting.

Because scheduled workflows run the default-branch copy of the workflow file, prerelease self-repairs on the first cron run after this lands on main — no manual branch surgery needed.

@github-actions

Copy link
Copy Markdown
Contributor

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2060.quarto.org

@cderv cderv merged commit 2e75f8e into main Jun 11, 2026
4 checks passed
@cderv cderv deleted the fix-redirects-wipe branch June 11, 2026 12:02
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed for prerelease, because it was unable to cherry-pick the commit(s).

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
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