maven release type repeatedly opens empty snapshot PRs with grouped multi-package releases
Environment details
- OS: GitHub Actions
ubuntu-latest - Node.js version: Not applicable; using
googleapis/release-please-action@v4 - npm version: Not applicable; no npm commands are run
release-pleaseversion:googleapis/release-please-action@v4(exact bundled version:<add from workflow log>)
Steps to reproduce
This issue occurs with the combination of:
"release-type": "maven""separate-pull-requests": false, so package releases are grouped- Multiple configured packages (the reproduction uses
alphaandbeta)
Reproduction repository: https://github.com/pwhissell/maven-snapshot-loop-demo
- Allow GitHub Actions to create pull requests in the repository.
- Merge the grouped release PR.
- Merge the grouped
autorelease: snapshotPR. - Push a commit with the message
fix(alpha): correct alpha behavior.
Expected: release-please opens a regular patch release PR for alpha.
Actual: release-please opens another snapshot PR with no changed files instead of the alpha release PR. The cycle can repeat after merging the empty snapshot PR.
Suspected cause
This appears to originate in Java.needsSnapshot(). Snapshot detection parses merged PR titles with PullRequestTitle.parse() and matches the parsed component and version to the component currently being processed. When "separate-pull-requests" is false, the grouped PR title is shared across packages and does not contain each component's name and snapshot version. As a result, title parsing cannot identify alpha's snapshot, and release-please proposes another snapshot PR.
The grouped PR body does contain the per-component release information (see PullRequestBody.parse()), but Java.needsSnapshot() currently parses only the PR title and does not use the body to check for the component's snapshot.
Source: googleapis/release-please