Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-please: Release please is ignoring commits in multi-commit owlbot PRs #3220

Closed
Neenu1995 opened this issue Feb 24, 2022 · 3 comments
Closed
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@Neenu1995
Copy link
Contributor

Neenu1995 commented Feb 24, 2022

Owlbot behaviour changed recently to add multiple commit to the same PR as opposed to multiple PRs. This appends multiple commits with their contexts in the PR body. Release-please used to pick up all commit messages with conventional commit prefix(feat, fix, deps etc) and add it to the release notes in release PR. Now it is only picking the commit message in the title and not in the body.
Example PR: googleapis/java-common-protos#322

image

Proposed release PR only has the title commit.

Example release PR: googleapis/java-common-protos#326

image

@Neenu1995 Neenu1995 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Feb 24, 2022
@parthea
Copy link
Contributor

parthea commented Feb 25, 2022

The only solution I have found for this issue is to use the automerge label to merge PRs. It would be great to have another solution as I've noticed automerge can take several minutes to merge depending on how large the backlog is.

@bcoe
Copy link
Contributor

bcoe commented Feb 25, 2022

When merging a PR the content looks like this if it's not manually cleaned up:

* feat: Update Logging API with latest changes

PiperOrigin-RevId: 429289471

Source-Link: https://github.com/googleapis/googleapis/commit/acd5f89b8addd2ff54f41a7d43ff9b122bb43337

Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a12622536ae2e9a8978198a151e89234b839b20
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGExMjYyMjUzNmFlMmU5YTg5NzgxOThhMTUxZTg5MjM0YjgzOWIyMCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: KMS configuration in settings
chore: formatting changes

PiperOrigin-RevId: 430243637

Source-Link: https://github.com/googleapis/googleapis/commit/95da686e8840cf3edf872ce3d095967e24e41bf6

Source-Link: https://github.com/googleapis/googleapis-gen/commit/a1f056b7689ccbe5aebc0bfdd318e9945ee7602a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTFmMDU2Yjc2ODljY2JlNWFlYmMwYmZkZDMxOGU5OTQ1ZWU3NjAyYSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

This is by virtue of how GitHub handles multiple commits in a PR.

If you manually cleanup the commit message when merging, so that it looks like this:

feat: Update Logging API with latest changes
PiperOrigin-RevId: 429289471
Source-Link: https://github.com/googleapis/googleapis/commit/acd5f89b8addd2ff54f41a7d43ff9b122bb43337
Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a12622536ae2e9a8978198a151e89234b839b20
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGExMjYyMjUzNmFlMmU5YTg5NzgxOThhMTUxZTg5MjM0YjgzOWIyMCJ9
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
feat: KMS configuration in settings
chore: formatting changes
PiperOrigin-RevId: 430243637
Source-Link: https://github.com/googleapis/googleapis/commit/95da686e8840cf3edf872ce3d095967e24e41bf6
Source-Link: https://github.com/googleapis/googleapis-gen/commit/a1f056b7689ccbe5aebc0bfdd318e9945ee7602a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTFmMDU2Yjc2ODljY2JlNWFlYmMwYmZkZDMxOGU5OTQ1ZWU3NjAyYSJ9
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

Then it will be parsed appropriately.

The problem is the additional newlines GitHub adds, and the * that prepends the commits.

@chingor13
Copy link
Contributor

As @bcoe explains, this is behaving exactly according to spec. We intentionally do not parse the default squash/merge commit format because usually if you are squash merging, you do not want all the intermediate commit messages to appear in the changelog.

When you are manually merging a commit, the onus is on the maintainer to correctly format the commit message.

If you do err when merging, you can override the message using: https://github.com/googleapis/release-please#how-can-i-fix-release-notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants