Skip to content

feat(backports): list commits on main that have not reached a release branch - #74

Merged
aclark4life merged 1 commit into
mainfrom
backports-command
Aug 26, 2026
Merged

feat(backports): list commits on main that have not reached a release branch#74
aclark4life merged 1 commit into
mainfrom
backports-command

Conversation

@aclark4life

Copy link
Copy Markdown
Collaborator

Summary

Assembling the next Backports for 5.2.5 LTS PR — successor to INTPYTHON-528 Backports for 5.2.4 LTS (#607) — means finding commits on django-mongodb-backend's main that aren't yet on 5.2.x. Nothing in dbx answered 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.

$ dbx backports django-mongodb-backend

📋 Backport candidates from upstream/main:

🌿 6.0.x
   since 6.0.4 (2026-07-14)
   ✅ nothing to backport (7 release chore(s) skipped)
🌿 5.2.x
   since 5.2.4 (2026-08-24)
   ✅ nothing to backport (1 release chore(s) skipped)
🌿 5.1.x
   ⚠️  No 5.1.* release tag — skipping (pass --since or --all to list anyway)

The window is the design

Candidates are bounded by the target branch's latest release tag, not the branch point:

bound commits missing from 5.2.x
since the branch point 164 (82 after filtering chores)
since the 5.2.4 tag 1

The 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 main commits they carried keep their own patch-ids — git log --cherry-mark recognises 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. --since and --all widen 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, and Update to Django X.Y — the opposite of a backport). Everything else is shown.

Notes

  • 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 in the first draft.
  • Fetches by default: a stale clone under-reports, which is the dangerous direction. --no-fetch opts out.
  • latest_release_tag / classify_commit / git_out move to utils/release.py so the two commands share them rather than importing across command modules. sync.py is refactor-only and its 30 tests are untouched.

Testing

  • 13-case parametrized chore-filter test and 9 command tests (tag window, chore hiding, --all, = cherry-mark skipping, missing tag, --since override, unknown --to branch, branch ordering).
  • Full suite: 511 passed. Docs build at the same 2 pre-existing warnings.

… 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.
@aclark4life
aclark4life merged commit 29b28bc into main Aug 26, 2026
12 checks passed
@aclark4life
aclark4life deleted the backports-command branch August 26, 2026 17:42
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.

1 participant