Closed hongmingavaya closed 9 months ago
What does the commit history look like on the main
branch? Any PR title is actually irrelevant to what release-please looks at in the release.
It looks like you are using plain merges which is not advised (see https://github.com/googleapis/release-please#linear-git-commit-history-use-squash-merge).
Please re-open with additional information otherwise, we are just speculating.
What does the commit history look like on the
main
branch? Any PR title is actually irrelevant to what release-please looks at in the release.It looks like you are using plain merges which is not advised (see https://github.com/googleapis/release-please#linear-git-commit-history-use-squash-merge).
Please re-open with additional information otherwise, we are just speculating.
Below is the commit history of main branch:
And following is the output of google-github-actions/release-please-action@v3 after merged PR 2
Run google-github-actions/release-please-action@v3 ✔ Looking for latest release on branch: main with prefix: main ❯ Fetching merge commits on branch main with cursor: undefined ❯ Found latest release pull request: 92 version: 1.1.13 ❯ Fetching releases with cursor undefined ❯ found release for main Version { major: 1, minor: 1, patch: 13, preRelease: undefined, build: undefined } ❯ found release for main Version { major: 1, minor: 1, patch: 12, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 11, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 10, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 9, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 8, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 7, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 6, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 5, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 4, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 3, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 2, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 1, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 0, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 7, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 6, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 5, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 4, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 3, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 2, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 1, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found 2 possible releases. [ Version { major: 1, minor: 1, patch: 13, preRelease: undefined, build: undefined }, Version { major: 1, minor: 1, patch: 13, preRelease: undefined, build: undefined } ] ✔ Building releases ✔ Building strategies by path ❯ .: simple ✔ Looking for latest release on branch: main with prefix: main ❯ Fetching merge commits on branch main with cursor: undefined ❯ Found latest release pull request: 92 version: 1.1.13 ❯ Fetching releases with cursor undefined ❯ found release for main Version { major: 1, minor: 1, patch: 13, preRelease: undefined, build: undefined } ❯ found release for main Version { major: 1, minor: 1, patch: 12, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 11, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 10, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 9, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 8, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 7, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 6, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 5, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 4, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 3, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 2, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 1, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 1, patch: 0, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 7, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 6, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 5, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 4, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 3, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 2, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found release for main Version { major: 1, minor: 0, patch: 1, preRelease: undefined, build: undefined } ❯ SHA not found in recent commits to branch main, skipping ❯ found 2 possible releases. [ Version { major: 1, minor: 1, patch: 13, preRelease: undefined, build: undefined }, Version { major: 1, minor: 1, patch: 13, preRelease: undefined, build: undefined } ] ✔ Building pull requests ✔ Building strategies by path ❯ .: simple ✔ Collecting release commit SHAs ❯ release search depth: 400 ❯ Fetching releases with cursor undefined ❯ Found release for path ., main-v1.1.13 ❯ release for path: ., version: 1.1.13, sha: af5166bad3b9c71986e48e213ecb0d8ee9647259 ✔ Collecting commits since all latest releases ❯ commit search depth: 500 ❯ Set(1) { 'af5166bad3b9c71986e48e213ecb0d8ee9647259' } ❯ Fetching merge commits on branch main with cursor: undefined ❯ Backfilling file list for commit: 19a256ea1bed10646fa1379986e4d529ab0b1065 ❯ Found 2 files ❯ Backfilling file list for commit: 54fbfd7d2e18e86c1386ffe52ba1a552d2ce7fc9 ❯ Found 1 files ❯ Backfilling file list for commit: 2ca36a3881cf220e6d82dff71d2003c8d042263c ❯ Found 1 files ❯ Backfilling file list for commit: d1ce154208a736c8ba7b06de57d6c753ee4a3aa3 ❯ Found 1 files ❯ Backfilling file list for commit: 28b92fb09e5bef20ba21f47baa9ae30a4a1ab4ec ❯ Found 1 files ❯ Backfilling file list for commit: 770fed5103afd3a7308c10c6b00aee6a3610d4ac ❯ Found 2 files ❯ Backfilling file list for commit: 8dd85e12ca05eb4e350ab728e4c4ed41e44e3087 ❯ Found 1 files ❯ Backfilling file list for commit: 748df90567689a1ab6d484896bfdaa60674ed2c8 ❯ Found 1 files ❯ Backfilling file list for commit: fd17191bdc9b0aba54e0300ac8870cf0f3c2bdb5 ❯ Found 1 files ❯ Backfilling file list for commit: 86568b84b8dd554e5973ad91c047fbc98686f3e5 ❯ Found 1 files ❯ Backfilling file list for commit: 3e2c3c74e1987d4a98389201310ea0e3a3d368b7 ❯ Found 1 files ❯ Backfilling file list for commit: b8dfc66ef7fab82016b211b97e5245120a5738bf ❯ Found 1 files ❯ Backfilling file list for commit: 98052a6055f9fbdd2596f1d683efc297ebec9c98 ❯ Found 1 files ❯ Backfilling file list for commit: 5ba5043d8c866a6b6fe91c3e554787dbe2f38031 ❯ Found 2 files ❯ Backfilling file list for commit: 8143b12fa175e0edd9cd93c86534f537adc5e51d ❯ Found 1 files ❯ Backfilling file list for commit: cb30bf857f678549943647426bb2d84aaf01efdf ❯ Found 1 files ❯ Backfilling file list for commit: f1a39c35dd4a63fae8618585e1e7f74953b8e3bc ❯ Found 4 files ✔ Splitting 1 commits by path ✔ Building candidate release pull request for path: . ❯ type: simple ❯ targetBranch: main ❯ commits: 1 ✔ Considering: 1 commits ❯ component: main ❯ pull request title pattern: undefined ✔ No user facing commits found since af5166bad3b9c71986e48e213ecb0d8ee9647259 - skipping
BTW, under github's Settings/General/Pull Requests, Allow squash merging is checked and the default commit message is set to "pull requst title and commit details"
@chingor13: I added comment, can you take a look?
Any updates on this? I'm having a similar issue...
I'm also having the same issue and have created a repo and issue to help illustrate the issue in a straightforward and simple way, including a recording of the issue in action; https://github.com/googleapis/release-please-action/issues/998
I did the same what @chingor13 suggested and it worked well for me.
While merging(approving) the PR, use SQUASH AND MERGE instead of using MERGE PULL REQUEST.
I appreciate the recommendation, @romeshqubits, but it is not a requirement based on the documentation. In my opinion, release automation tools should not dictate the method in which a team chooses to handle their commit strategy. I want full audit trails, history, and metadata; squashing limits that.
Since reporting this issue, https://github.com/googleapis/release-please-action/issues/998, I have moved onto semantic-release. semantic-release has worked reliably in all of my testing and does not fail due to the issue explained initially, or the issue I reported.
CC: @chingor13
TL;DR
There are two pull requests pending for approval. Each of them has conventional commit messages (fix:xxx). Merging of second one won't create a release pull request after the first one has been merged.
Expected behavior
Create a branch A based on latest main branch, make some changes with commit comment “fix:A”, then create a pull request A to merge the changes in branch A into main branch.
Create a branch B based on latest main branch, make some changes with commit comment to “fix:B”, then create a pull request B to merge the changes in branch B into main branch.
Merge pull request A into main branch, the changes in pull request A is successfully merged into main branch and a new release A is cut.
Merge pull request B into main branch, the changes in pull request B is successfully merged into main branch and a new release pull request is created.
Observed behavior
❯ targetBranch: main ❯ commit could not be parsed: 9f7c798637181f4ea10624b1f9ef8ae57028e236 Merge pull request #159 from customer/testbranch ❯ commits: 0 ✔ Considering: 0 commits ✔ No commits for path: ., skipping
Action YAML
Log output
No response
Additional information
No response