Non-atomic overflow write leaves release-notes.md missing, and every later run fails with "Failed to find file"
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, node.js, typescript
- Domain
- backend-api-design, release
Research direction
Start with FilePullRequestOverflowHandler.handleOverflow in the overflow write path and parseOverflow, which reads release-notes.md from the notes branch. Trace how createFileOnNewBranch updates the branch before writing the file, then inspect the tests for overflow parsing and file creation. Done means a failed write no longer leaves later runs unable to recover; the issue suggests atomic writes or treating a missing overflow file as recoverable.
Written by the indexing model from the issue text.
Description
Environment details
- OS: GitHub Actions
ubuntu-24.04runner - Node.js version: node24 (the action's runtime)
- npm version: n/a (the bundled action)
release-pleaseversion: 17.6.0, viagoogleapis/release-please-actionv5.0.0. The same code is onmainand in v17.11.2.
Summary
When a release PR's body exceeds 65,536 characters, FilePullRequestOverflowHandler.handleOverflow stores the notes in release-notes.md on <head branch>--release-notes. It does this through GitHubApi.createFileOnNewBranch (src/github-api.ts), which makes two separate API calls:
forkBranchforce-updates the notes branch to the default branch's SHA (git.updateRefwithforce: true).repos.createOrUpdateFileContentscommitsrelease-notes.mdonto it.
If the second call fails (for example on a GitHub 5xx), the notes branch is left on a plain default-branch commit with no release-notes.md. The release PR's body still holds the overflow link to that file.
After that, every run fails, and release-please can't recover on its own:
Manifest.createPullRequests→findOpenReleasePullRequests→parseOverflowcallsgetFileContentsOnBranch('release-notes.md', <notes branch>). That throwsFileNotFoundError, and nothing catches it.- This happens before
createOrUpdatePullRequest→updatePullRequest→handleOverflow, the step that would rewrite the file. findMergedReleasePullRequestsalso callsparseOverflow. So if the release PR is merged in this state, building the release fails the same way and nothing is tagged.
The run that hit the 5xx failed right after the branch update, with:
release-please failed: Server Error
Every later run fails with:
release-please failed: Failed to find file: release-notes.md
Deleting the notes branch doesn't help, because parseOverflow still follows the link in the body and fails before anything recreates the branch. The workaround is to point the notes branch back at the previous "Saving release notes" commit by hand, or to edit the release PR's body.
Steps to reproduce
- Have an open release PR whose notes exceed 65,536 characters, so its body is the overflow message and the notes live in
release-notes.mdon the--release-notesbranch. - Make
createOrUpdateFileContentsfail afterforkBranchhas succeeded. A GitHub 5xx does this in practice. To simulate it, force-update the--release-notesbranch to the default branch's head, which has norelease-notes.md. - Run release-please again. It fails with
Failed to find file: release-notes.mdon this run and on every run after it.
Suggested fix
Either of these would avoid the stuck state:
- Make the write atomic. Create the blob, tree and commit with the git data API, parented on the default branch's SHA, then move the notes branch to that commit with a single
updateRef. A failure at any step then leaves the previous notes in place. - Treat a missing overflow file as recoverable. In
parseOverflow, catchFileNotFoundError, log a warning and return a body that is known to differ from the candidate's. The open PR is then still matched by its head branch, andupdatePullRequest→handleOverflowrewrites the file on the same run.
- Dominant language
- TypeScript
- Stars
- 7.8k
- Forks
- 621
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/release-please
-
BREAKING CHANGE footer with a continuation line keeps only the last linePossibly taken @kojiromike claimed this 7 days ago. Openpriority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/release-please#2955 · 1 comment ·
Maintainers usually reply within 2 days
-
Overflow release-notes.md is saved with latin1 encoding, corrupting non-ASCII characters (e.g. ⚠)Possibly taken @jay23606 claimed this 7 days ago. Openpriority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
googleapis/release-please#2953 ·
Maintainers usually reply within 2 days
-
priority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
googleapis/release-please#2952 ·
Maintainers usually reply within 2 days
-
exclude-paths filters out empty Release-As commits in manifest modePossibly taken @anishesg claimed this 63 days ago. Openpriority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/release-please#2891 · 1 comment ·
Maintainers usually reply within 2 days
-
TypeError: Cannot read properties of undefined (reading 'match') when a commit subject contains a raw `<details>` token - crashes re-parsing of the open release pull request bodyPossibly taken @johnitvn claimed this 83 days ago. Openpriority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/release-please#2884 · 1 reaction ·
Maintainers usually reply within 2 days
All issues in googleapis/release-please
Similar issues
-
parse: child keys like `007`, `1e3`, `0x1f`, `-1` make the parent an empty array and hide the valueOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
bketelsen/pi-pocket-team#232 ·
Maintainers usually reply within 1 day
-
bug UI
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
wardian-app/Wardian#1746 ·
Maintainers usually reply within 1 day
-
area: interop area: sip-core v3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fonoster/routr#705 · 1 comment ·
Maintainers usually reply within 1 day