feat(backports): list commits on main that have not reached a release branch - #74
Merged
Conversation
… branch Assembling the next "Backports for 5.2.5 LTS" PR -- the successor to INTPYTHON-528 Backports for 5.2.4 LTS (#607) -- means finding commits on django-mongodb-backend's main that are not yet on 5.2.x. Nothing in dbx answered that. The release-gap report added in #71/#73 looks like it should, but it compares the *Django fork* against a released *backend* tag, so it never opens the backend's own branches: wrong repos, wrong pair. `dbx backports <repo>` compares a repo's main against each of its X.Y.x release branches and lists what has not made it across, bounded by that branch's latest release tag. The window is the whole design. Since the 5.2.x branch point, 164 commits are missing from 5.2.x -- 82 after filtering release chores, and nearly all of those are feature work that the supported-versions policy forbids on an LTS branch. Since the 5.2.4 tag there is one. The older commits are not candidates: they were already triaged when #607 was assembled, and were either taken or deliberately skipped. The window is also load-bearing for correctness. Backports get squashed into a single commit, so the main commits they carried keep their own patch-ids and `git log --cherry-mark` recognises only 6 of the 164 as already present. Bounding by the tag sidesteps that, because everything the squash carried predates it. The cost is that a fix missed before the last release stays hidden, so --since and --all widen the window for that hunt. Branches with no release tag (5.1.x, 5.0.x) are skipped rather than falling back to the branch point, which dumped 262 and 290 lines of commits that were never candidates. Eligibility is left to the reader. Only security fixes and data-loss bugs belong on LTS branches per the backend's release-process.rst, and no commit subject marks those. The documented signal is the PR description, but roughly 4 of the last 60 merged PRs follow it and there is no backport label, so keying off it would report an empty list and look authoritative. Release chores are filtered (version bumps including ticket-prefixed ones, dependency bumps, SBOM, stub notes, release prep, and "Update to Django X.Y", which is the opposite of a backport); everything else is shown. Moves latest_release_tag/classify_commit/git_out into utils/release.py so the two commands share them instead of importing across command modules. sync.py is refactor-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Assembling the next
Backports for 5.2.5 LTSPR — successor toINTPYTHON-528 Backports for 5.2.4 LTS (#607)— means finding commits ondjango-mongodb-backend'smainthat aren't yet on5.2.x. Nothing indbxanswered that.The release-gap report from #71/#73 looks like it should, but it compares the Django fork against a released backend tag and never opens the backend's own branches. Wrong repos, wrong pair.
The window is the design
Candidates are bounded by the target branch's latest release tag, not the branch point:
5.2.x5.2.4tagThe 164 are nearly all feature work the supported-versions policy forbids on LTS. They're also not candidates: each was already triaged when #607 was assembled, and either taken or deliberately skipped.
The window is load-bearing for correctness, not just brevity. Backports get squashed into one commit, so the
maincommits they carried keep their own patch-ids —git log --cherry-markrecognises only 6 of 164 as already present. Bounding by the tag sidesteps that, since everything the squash carried predates the tag.The cost: a fix that should have been backported before the last release and was missed won't appear.
--sinceand--allwiden the window for that hunt. This is called out in the docs as a warning rather than left implicit.Eligibility is left to the reader
Only security fixes and data-loss bugs belong on LTS branches per the backend's
release-process.rst, and no commit subject marks those. The documented signal is the PR description — but ~4 of the last 60 merged PRs follow that convention and there's no backport label, so keying off it would report an empty list and look authoritative.Release chores are filtered (version bumps including ticket-prefixed
INTPYTHON-1050 Bump version to 6.1.0, dependency/actions bumps, SBOM, stub notes, release prep, CODEOWNERS, andUpdate to Django X.Y— the opposite of a backport). Everything else is shown.Notes
5.1.x,5.0.x) are skipped rather than falling back to the branch point, which dumped 262 and 290 lines in the first draft.--no-fetchopts out.latest_release_tag/classify_commit/git_outmove toutils/release.pyso the two commands share them rather than importing across command modules.sync.pyis refactor-only and its 30 tests are untouched.Testing
--all,=cherry-mark skipping, missing tag,--sinceoverride, unknown--tobranch, branch ordering).