Skip to content

Show release notes for all versions of MUSE2 in old versions of docs#1268

Open
alexdewar wants to merge 7 commits intomainfrom
fix-old-release-notes
Open

Show release notes for all versions of MUSE2 in old versions of docs#1268
alexdewar wants to merge 7 commits intomainfrom
fix-old-release-notes

Conversation

@alexdewar
Copy link
Copy Markdown
Member

Description

When you navigate to an old version of the docs (since v2.1.0), there will be chapters for release notes for all the different versions of MUSE2 listed in the navigation bar, but it will only show the release notes that were bundled in the old version of the docs, i.e. no newer versions. For v2.0.0, there are no release notes included in the docs anyway, which is less of a problem, but only showing release notes for some versions of MUSE2 is potentially confusing. This isn't a problem now, but once we've released v2.2.0, the release notes for this won't appear in the docs for v2.1.0 etc., so we should fix it.

I've changed the build_old_docs.py script to substitute in the release notes from the dev version of the docs, so they should always be up to date. It does this by patching SUMMARY.md (which has the TOC) and symlinking/copying the docs/release_notes folder. I had to add a couple of patch files to the old versions of the docs to make this work, but we shouldn't need to do this going forward.

As part of this, I changed the way the git repo is used. Previously, we cloned the whole thing to a temp dir, then checked out the different versions one by one. Now that we're mucking about with the git tree by deleting files etc., it makes it messier to change between the different tags, so I switched to using a different worktree for each instead.

While I was at it, I fixed #1189.

Closes #1251. Closes #1189.

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc
  • Update release notes for the latest release if this PR adds a new feature or fixes a bug
    present in the previous release

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Copilot AI review requested due to automatic review settings April 29, 2026 20:45
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.76%. Comparing base (1aa603d) to head (5a8208f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1268   +/-   ##
=======================================
  Coverage   89.76%   89.76%           
=======================================
  Files          57       57           
  Lines        8210     8210           
  Branches     8210     8210           
=======================================
  Hits         7370     7370           
  Misses        544      544           
  Partials      296      296           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the “old docs” build pipeline so older documentation versions always include the latest MUSE2 release notes (avoiding confusing partial release-note navigation in historical docs), and makes the old-docs build process safer to modify by switching from checkout-in-place to per-release git worktrees.

Changes:

  • Add “release notes” anchor markers in docs/SUMMARY.md (and via patches in v2.0.0/v2.1.0) so the old-docs builder can replace the release-notes section consistently.
  • Update docs/build_old_docs.py to (a) build each release from its own git worktree, and (b) inject the current release-notes TOC + link/sync docs/release_notes into each old-docs build.
  • Add a v2.0.0 patch to include the “Other versions of documentation” placeholder chapter (fixes #1189).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/build_old_docs.py Switches old-doc builds to worktrees and patches old SUMMARY.md + release_notes directory to always use latest release notes.
docs/SUMMARY.md Adds anchor comments delimiting the release-notes section for extraction/substitution.
docs/release/patches/v2.1.0/0001-SUMMARY.md-Add-release-notes-anchors.patch Adds release-notes anchors to v2.1.0 docs so the builder can replace that section.
docs/release/patches/v2.0.0/0002-Add-placeholder-other-versions-of-docs-chapter.patch Adds “Other versions of documentation” entry to v2.0.0 SUMMARY.
docs/release/patches/v2.0.0/0003-SUMMARY.md-Add-release-notes-anchors.patch Adds release-notes anchors to v2.0.0 SUMMARY so the builder can inject current release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/build_old_docs.py

for line in lines:
if RELEASE_NOTES_START_ANCHOR in line:
assert not found_start_anchor
Comment thread docs/build_old_docs.py
@alexdewar alexdewar requested a review from Aurashk April 29, 2026 21:06
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.

"Release notes" chapter for old versions of docs will not include newer versions Missing "other versions of documentation" chapter for v2.0.0 of docs

2 participants