fix(release): drop package-name from release-please config#328
Merged
Conversation
The combination of package-name + include-component-in-tag: false
causes release-please to bail at tag-creation time because the
configured component ("go-eventually") doesn't match the empty
component parsed from the branch name. See upstream issue
googleapis/release-please#2214.
Symptoms: merged release PRs stay labelled 'autorelease: pending'
and no tag/release is cut, because buildReleases() returns early at
src/strategies/base.ts with the warning:
"PR component: undefined does not match configured component:
go-eventually"
Since this is a single-module repo with no version file, package-name
provided no value (the tag is already just vX.Y.Z at root) and only
risked leaving merged release PRs stuck.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #328 +/- ##
=======================================
Coverage 63.64% 63.64%
=======================================
Files 38 38
Lines 1400 1400
=======================================
Hits 891 891
Misses 447 447
Partials 62 62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
package-namefromrelease-please-config.json. This field was triggering an upstream release-please bug that left merged release PRs stuck inautorelease: pendingand prevented tag/GitHub-Release creation.Root cause
With
include-component-in-tag: false(as we have configured), release-please's PR-creation leg correctly uses an empty component. But its PR-parsing leg — used duringbuildReleasesto decide whether to cut a tag — ignores that flag and falls through togetBranchComponent(), which returns thepackage-namevalue ("go-eventually"). The configured component ("go-eventually") is then compared against the component parsed from the branch name (`release-please--branches--main`), which is `undefined`. Mismatch → early return → no tag.This is the upstream bug tracked at googleapis/release-please#2214, open since Feb 2024.
Evidence from the stuck workflow run
Run #24731049954 (post-merge of #327) logged:
```
⚠ PR component: undefined does not match configured component: go-eventually
```
and then:
```
⚠ There are untagged, merged release PRs outstanding - aborting
```
The tag
v0.4.0was never created even though PR #327 was merged successfully.Fix
Remove
package-name— it provides no value here:include-component-in-tag: false).version-fileto write the package name into.vMAJOR.MINOR.PATCHat repo root.With
package-namegone,getBranchComponent()returns'', which matches the empty component parsed from the release branch name, andbuildReleasesno longer bails.Recovery for the stuck v0.4.0
The stalled
v0.4.0tag will be created manually (separately from this PR) by tagging commit5e41a02026adf5f4d585aa4b93b9a47bf3326c3fand flipping PR #327's label fromautorelease: pending→autorelease: tagged. After that, this config fix ensures the next release cycle (v0.4.1for this commit) tags automatically when its release PR is merged.