ci: make scheduled branch matrix dynamic - #5412
Conversation
|
Alas no way to test this until we merge. |
0f3f9fa to
e869baa
Compare
|
Would be nice to have before 1.6 since the matrix will change and we'll forget again (see #5393 as an example of how we forgot). |
lifubang
left a comment
There was a problem hiding this comment.
LGTM
One edge case worth flagging: the selection is based on branch existence, whereas the support policy in RELEASES.md is about released versions. Since a new release branch is created at rc.1 (feature freeze, ~2 months before the .0 release), the moment release-1.6 is created the matrix becomes [main, release-1.6, release-1.5, release-1.4] and release-1.3 drops out of scheduled CI, even though 1.3 is still a supported release (latest-2) until 1.6.0 actually ships.
The impact is limited: only the oldest branch loses scheduled coverage for that ~2-month window (it still gets CI on every PR and via workflow_dispatch), and testing the upcoming rc branch is arguably more valuable anyway, so this may be perfectly fine. If we ever want the matrix to track the support policy exactly, we could exclude branches whose latest tag is still -rc.
Not blocking, just making sure this is a conscious decision.
The list of branches to run periodical CI on was hardcoded, meaning it had to be manually updated on every minor release (add the new release branch, drop the one that falls out of support per RELEASES.md), and would silently keep testing unsupported branches if we forgot. Instead, list the repo branches via the API and pick the three most recent release-X.Y ones (latest, latest-1, latest-2), plus main. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
e869baa to
4f1e7e3
Compare
You're right about it. Three ways to solve it:
I'm choosing option 3 -- after all, we did not have this testing at all for quite some time (#5393) and no one noticed. |
|
(oh, and I've added a comment to the job explaining that we lose the oldest branch for some time) |
Follow-up to #5393 (review comment).
The list of branches to run periodical CI on was hardcoded, meaning it had to be manually updated on every minor release (add the new release branch, drop the one that falls out of support per RELEASES.md), and would silently keep testing unsupported branches if we forgot.
Instead, a
preparejob lists the repo branches via the API and picks the three most recentrelease-X.Yones (latest,latest-1,latest-2), plusmain, feeding them into the matrix viafromJSON.Running the same selection logic against the current branch list of this repo yields
["main", "release-1.5", "release-1.4", "release-1.3"], i.e. exactly the list that was hardcoded before, so there is no behavior change today.🤖 Generated with Claude Code