Update plugin list on maintenance branch to keep stable docs current#14538
Conversation
The weekly plugin list update only targets `main`, which means docs.pytest.org/en/stable (built from the maintenance branch, e.g. 9.0.x) always shows a stale plugin list frozen at the time of release. Add a second job that dynamically finds the latest maintenance branch and creates a PR to update plugin_list.rst there too.
|
Thanks @dyollb! However I fear this might create merge conflicts when we need to merge the maintenance branch back into What if we just apply the appropriate "backport" label to the PR that is created to |
|
Alternatively, add a note at the top saying to look at /latest |
|
a workflow that auto sync it may be more fitting - we dont need to backport like a patch - we can jsut take the verbatim content and update the blob |
We "don't", but might be the simplest solution. |
I tried to change the PR to use your label approach. Is this what you meant? Thanks |
|
Yes it is, thanks! Could you take a look at the linting failures please? It suggests it can auto-fix the issues if ran locally. |
|
Thanks! I will merge this tomorrow to give time for others to speak up in case they have concerns with this approach. 👍 |
The-Compiler
left a comment
There was a problem hiding this comment.
The approach seems fine to me, iff it actually works (there are some limitations regarding labels added automatically then triggering automated workflows again, afaik). @webknjaz any thoughts?
I have one suggestion regarding tooling, but no hard feelings either way.
| branch=$(git ls-remote --heads https://github.com/pytest-dev/pytest.git \ | ||
| | grep -oE 'refs/heads/[0-9]+\.[0-9]+\.x' \ | ||
| | sed 's|refs/heads/||' \ | ||
| | sort -t. -k1,1n -k2,2n \ | ||
| | tail -1) |
There was a problem hiding this comment.
| branch=$(git ls-remote --heads https://github.com/pytest-dev/pytest.git \ | |
| | grep -oE 'refs/heads/[0-9]+\.[0-9]+\.x' \ | |
| | sed 's|refs/heads/||' \ | |
| | sort -t. -k1,1n -k2,2n \ | |
| | tail -1) | |
| branch=$(git ls-remote --heads --sort=v:refname https://github.com/pytest-dev/pytest.git 'refs/heads/*.x' \ | |
| | sed '$!d;s|.*\trefs/heads/||') |
to use the existing capabilities of git ls-remote and sed (sed one-liners is great for this).
There was a problem hiding this comment.
- Switched branch discovery to the reviewer’s version-sorted command
- Added fail-fast validation so the job exits clearly if no *.x branch is found
- I also tightened the label step guard so it only runs when both PR number and branch are present
As far as I understand:
|
|
Thanks @dyollb! Triggered a run: https://github.com/pytest-dev/pytest/actions/runs/27685939056/job/81884534201 |
|
Hmmm: Actually there is no My bad, I assumed the command was verified before the PR was submitted, but I should have verified this myself. |
|
Follow up: #14616 |
Summary
docs.pytest.org/en/stableis built from the maintenance branch (e.g.9.0.x), notmain. The weekly plugin list update only targetsmain, so stable docs show a frozen plugin list from the release cut.Fix
Update the workflow to:
N.N.x)mainand applybackport <branch>labelThis uses pytest's existing backport automation, avoiding merge conflicts and duplicate logic.
Also adds missing
ifguard to the "Instruct maintainers" step to prevent failures when there are no plugin list changes.