Skip to content

fix(release-pr): list only commits no release has shipped, and fit GitHub's body limit (ENG-4378) - #81

Merged
mindsdb-devops merged 2 commits into
mainfrom
fix/eng-4378-release-pr-unreleased-commits
Nov 17, 2026
Merged

mindsdb-devops merged 2 commits into
mainfrom
fix/eng-4378-release-pr-unreleased-commits

Conversation

@lucas-koontz

@lucas-koontz lucas-koontz commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

User story

As a release-train owner opening Monday's release
I want every repository's release PR to open each week and list what it will ship
So that I can review a release without paging through months of work that already shipped

Why this matters

cowork's release PR stopped opening after its last release merged. gh pr create refused the body: Body is too long (maximum is 65536 characters). Every staging build re-ran the workflow and failed again. The list was wrong anyway: it showed 868 commits, and only 18 were unreleased.

What happens today

The body lists git log main..staging. A squash-merged release puts one new commit on main, so the staging commits it shipped never become ancestors of main, and the list keeps them forever. cowork's release titles grew 764, 805, 850, 868.

What should happen

scripts/release_commits.py starts the list at the head of the newest merged staging → main PR. It lists the non-merge commits on staging that neither main nor that head contains. With merge-commit releases that equals main..staging. With no merged release, or a head staging no longer contains, it falls back to main..staging; a failed lookup does the same with a warning. The title's count and the Contributors come from the same list. Every run writes the whole list to its step summary. A list over 60,000 characters is cut, and the body links that run's summary, since GitHub's compare view fails to render a range that long. The check step decides on the tree alone and no longer logs the main..staging count.

Test plan

  • Only unreleased commits: against cowork's real history, the script lists 18 commits from the last release head, not 868.
  • Squash history: a test with three squash releases lists only the commits after the third. It fails on the old main..staging range.
  • Merge-commit releases: the list equals main..staging, as before.
  • No previous release, a head staging lacks, a failed lookup: each falls back to main..staging; the failed lookup is flagged.
  • Over the limit: a list past the budget is cut and counts what it cut, and the run summary still holds every commit. The real step, run against cowork's history with a failed lookup, lists 701 of 809 in a 60,877-character body, links the run, and writes all 809 to the summary.
  • Every caller: across the 12 repositories that call release-pr.yml, no change on staging lacks a listed commit. Squash-release lists drop to their unreleased commits (cowork 809 → 18), and merge-commit and no-release lists are unchanged.
  • No release when staging's tree equals main's: unchanged.
  • pytest tests/ (308 passed, 15 skipped), actionlint and workflow_graph.py pass; zizmor reports nothing new.

@lucas-koontz
lucas-koontz requested a review from a team November 17, 2026 03:45
@mindsdb-devops
mindsdb-devops merged commit e43fcec into main Nov 17, 2026
6 checks passed
@mindsdb-devops
mindsdb-devops deleted the fix/eng-4378-release-pr-unreleased-commits branch November 17, 2026 05:45
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.

2 participants