Skip to content

ci: fix release notes for release branches#5597

Merged
wjones127 merged 1 commit intolance-format:mainfrom
wjones127:ci/change-notes
Dec 30, 2025
Merged

ci: fix release notes for release branches#5597
wjones127 merged 1 commit intolance-format:mainfrom
wjones127:ci/change-notes

Conversation

@wjones127
Copy link
Copy Markdown
Contributor

When we cherry-pick bug fixes onto release branches, we sometimes need to modify the commits to work on a new base. When we do that, we change the commit so it's not the same as the original merge commit from the PR. The GitHub release-notes API excludes these commits from the notes it generates. This PR reproduces the same change notes format, but uses the commit messages to grab the PRs, even if they have been rebased.

@github-actions github-actions Bot added the ci Github Action or Test issues label Dec 30, 2025
@wjones127 wjones127 requested a review from jackye1995 December 30, 2025 20:00
@github-actions
Copy link
Copy Markdown
Contributor

Code Review

Summary: This PR adds a custom Python script to generate release notes from git commit history instead of relying solely on GitHub's API. The motivation is valid - cherry-picked commits to release branches may have different SHAs than the original merge commits, causing GitHub's API to miss them.

P1 Issues

  1. Missing error handling for subprocess failures (ci/generate_release_notes.py:70-74): The get_commits_between_tags function uses check=True which will raise an exception on failure, but there is no try/except wrapper. If tags do not exist or git fails, the workflow will crash with an unclear error. Consider wrapping with proper error handling.

  2. Missing PyYAML dependency: The script imports yaml but the CI workflows do not ensure this dependency is installed. GitHub Actions runners have it by default, but this implicit dependency should be documented or explicitly installed.

  3. No rate limiting consideration: If a release has many PRs, the script makes one gh pr view API call per PR sequentially. For large releases, this could hit rate limits or be slow. Consider batching with gh pr list or using GraphQL.

Minor Observations (non-blocking)

  • The script handles the happy path well and matches the expected output format.
  • Good use of dataclasses for structured data.
  • The category matching logic with wildcard support correctly mirrors GitHub's release.yml behavior.

Copy link
Copy Markdown
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix!

@wjones127 wjones127 merged commit 4bb435d into lance-format:main Dec 30, 2025
5 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 12, 2026
When we cherry-pick bug fixes onto release branches, we sometimes need
to modify the commits to work on a new base. When we do that, we change
the commit so it's not the same as the original merge commit from the
PR. The GitHub release-notes API excludes these commits from the notes
it generates. This PR reproduces the same change notes format, but uses
the commit messages to grab the PRs, even if they have been rebased.
jackye1995 added a commit that referenced this pull request Jan 12, 2026
When we cherry-pick bug fixes onto release branches, we sometimes need
to modify the commits to work on a new base. When we do that, we change
the commit so it's not the same as the original merge commit from the
PR. The GitHub release-notes API excludes these commits from the notes
it generates. This PR reproduces the same change notes format, but uses
the commit messages to grab the PRs, even if they have been rebased.

Co-authored-by: Will Jones <willjones127@gmail.com>
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
When we cherry-pick bug fixes onto release branches, we sometimes need
to modify the commits to work on a new base. When we do that, we change
the commit so it's not the same as the original merge commit from the
PR. The GitHub release-notes API excludes these commits from the notes
it generates. This PR reproduces the same change notes format, but uses
the commit messages to grab the PRs, even if they have been rebased.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Github Action or Test issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants