Repository navigation
Tracking: Introduce proper trunk/backport workflow #4738
Description
For now every rustup release is directly merged onto trunk and thus we might want to block patch releases from happening once a major/breaking change has landed (or vice versa). This is not very practical.
To keep and even further increase the bandwidth and momentum, an important change we would need to make to the current workflow would be to allow people from both inside and outside of the project to contribute whenever they want, and for the changes to land in the right release in a more flexible timeframe, so that we can introduce major changes even when we are waiting for patch releases. Thus the desire for a backport branch that collects all the bugfixes in this minor cycle, with proper CI and even CD (when the new release process is ready), from which we will force-push our stables.
Surely this needs more bandwidth, so it will probably not happen immediately, but I can see that this might be an important step in ensuring the project's long term health.
Tasks
- Merge the initial PR
- Test this change thoroughly a set dummy PRs:
- Make sure everything is good:
- In both the CI files and git itself, rename
backport/*torelease/*as suggested: - The
conclusionjob is identical to themainone. - Other pre-enqueue jobs are identical to the
mainones. -
The in-queue jobs are identical to theNo queue in the end, see below.mainones. - The after-merge jobs are identical to the
mainones modulo the deployment.- The deployment to GitHub Actions is kept.
- All other deployments should not trigger.
- In both the CI files and git itself, rename
- Enable the manual triggering of
schedule-level CI. - Delete the
release/1.29-dummybranch. - Inform the infra team to
enable merge queue(technically impossible due to GitHub restrictions (Add branch protection and merge queue for rustup release branch team#2372 (comment)))andadd branch protection rules (notably the force-push ban) forrelease/*branches. - Update the dev guide to reflect the new workflow, including the manual triggering of CI, changed branching rules, changed
stablestatus (can be force pushed instead of fast-forwarded), etc. - Create the
release/1.29branch: the version number should be bumped exceptionally to1.29.1. - Perform the first minor version bump on trunk (to
1.30.0).
Activity
ChrisDenton commentedon Mar 5, 2026
We could maybe ask if anyone from infra would help set up a stable branch (maybe a beta branch too?). Even if we can't make much use of it to start with, having something to build on would be useful.
rami3l commentedon Mar 5, 2026
@ChrisDenton The current
stablebranch is a placeholder for "what we want to deploy as the next release" but the semantics is too ambiguous it seems to me: we reuse it for every beta and every stable, and there's no guarantee that at a given point in time what that would be. I'm thinking about branches like X.YY with proper CI so that we can at least have something to track.djc commentedon Mar 5, 2026
For other projects I usually have branches like 1.29.x once main has incompatible changes and a maintenance release needs to be made. But IMO there is not much point in making these branches proactively, since you can always make them when needed?
ChrisDenton commentedon Mar 5, 2026
I thought the hard part was not creating the branches themselves (that's of course easy) but that all our infrastructure is based on the current setup (CI scripts, etc).
rami3l commentedon Mar 5, 2026
@ChrisDenton Exactly. For now a reasonable next step for us seems to be that:
Versioned backport branches get full CI both during backport PRs and upon push.
Change the release process so that the
stablebranch only serves as a staging area for releases. This will notably include force-pushing from any writer to this repo.rami3l commentedon Mar 16, 2026
So this is my plan: upon the next incompatible change please feel free to tell me, I'll create a branch named
backport/1.29(feel free to suggest alternative prefixes) and I'll coordinate with the mods to put force-push bans onbackport/*branches, and yes they should have merge queue enabled as well :)Once that's done I'll take care of CI on those branches.
[-]Introduce proper trunk/backport workflow[/-][+]Tracking: Introduce proper trunk/backport workflow[/+]rami3l commentedon Apr 2, 2026
Pseudo-
mainCI onrelease/*is running right now: https://github.com/rust-lang/rustup/actions/runs/23918294937Notably, the GitHub Actions artifacts are uploaded as usual, but no other deployment steps has been triggered 🚀
Next up, I'll:
Verify that the in-queue workflows are working identically to the occasions when we target trunk.Impossible, see the update in the original post.release/*on demand.Actually the latter part can wait for a bit, since we already have
stableas the final resort if that doesn't work out. Thus, it only adds more confidence rather than blocking the backport flow from happening.rami3l commentedon Apr 5, 2026
I have confirmed that with #4796, we can now run the equivalent of
scheduledtask manually:When the whole process is done, I'll update the dev docs to reflect the new procedure.
rami3l commentedon Apr 16, 2026
The
release/1.29-dummybranch has completed its mission, deleting...Next up: branching off as per our new release process and prepare for the v1.29.1 release.
rami3l commentedon Apr 17, 2026
@Kobzol I deeply appreciate your previous efforts in #4805 in which I promised an update when the trial is over. Now here it is :)
I tried in my personal project and it still seems feasible to at least enable the "require status check" for PRs targeting our backport branches while leaving "require a pull request" disabled. This means in that case I can still push to the topic branch if desired, so this will give us the level of flexibility we want:
Otherwise, your explicit settings look good to me:
Kobzol commentedon Apr 17, 2026
Requiring status checks without requiring a PR doesn't make much sense, because you can't run status checks without opening a PR 😅 (Maybe unless the status checks already ran on the same commit previously in a different branch/PR? 🤔 Not sure if GitHub works like this). Unless we enable bypassing the status check rule for specific teams.
rami3l commentedon Apr 17, 2026
@Kobzol That's correct, but according to my experiment this has also made it possible to have auto-merge on PRs targeting this branch so there are some real benefits after all.
My theory is that for low-bandwidth branches such as the backport ones having auto-merge is close enough to having a proper merge queue.
Kobzol commentedon Apr 17, 2026
Auto merge is a separate checkbox in the repository configuration, though it does indeed require status checks, otherwise it wouldn't work.
But again, you can't have required status checks without requiring a PR. GitHub would simply reject your
git push.rami3l commentedon Apr 17, 2026
@Kobzol My apologies, but there must have been a misunderstanding somewhere: both the screenshot above (#4738 (comment)) and GitHub's docs seem to suggest that "require a pull request" and "require status check" are two independent options.
That said, I now do agree with you that we should enable both for our case to avoid further confusions, in addition to the auto-merge one, if possible.
Kobzol commentedon Apr 19, 2026
Yeah they are independent, but if you enable only "require status check", it becomes impossible to merge anything without a PR - GitHub is fine with that apparently 😆
That being said, it can be made to work if you enable bypass actors. If you enable "require status checks", but not "require a PR", then when you push, you will be met with this:
If you add bypass actors, then specified teams (e.g. those with
writeaccess) will be able to push. And when a PR is opened, the PR will have to be green in order to be merged, unless you are a bypass actor, and you click on the following checkbox (which can be used to bypass the PR CI check):Is that ok for you?
rami3l commentedon Apr 19, 2026
@Kobzol Ah that explains, in my repo for this experiment we do have bypass actors enabled indeed, never thought that was related though.
Let's do that then! Many thanks again for the thorough investigation! 🙏
Update: Merged rust-lang/team#2437.
rami3l commentedon Aug 18, 2026
Closed by #4958 and rust-lang/simpleinfra#1178.