ci: fix release-please manifest tag handling#879
Merged
Conversation
There was a problem hiding this comment.
Approving. include-component-in-tag: false is the right manifest-mode escape hatch — undoes the #877 regression while leaving package-name: adcp to drive the changelog header and PR title, which is the right split.
Things I checked
release-please-config.json:9—include-component-in-tag: falsematches existing tag history.git tag --list 'v*'ends atv6.3.0-beta.4;git tag --list 'adcp-*'is empty. Manifest lookup keyed on"."is unaffected..github/workflows/release-please.yml:42-50—set -euo pipefailis compatible with the new probe block.git ls-remote --exit-codeis guarded byif, so non-zero exit doesn't trip errexit;2>/dev/nullswallows the expected stderr.- Component-suffixed branch (
...--components--adcp) is probed first, base branch second. Order is right: stale component-suffixed branches from #877 may still be on origin, so prefer-suffix-then-fall-back is the correct precedence today. ci:conventional prefix matches the diff: workflow + release config only, no public API surface, no source undersrc/adcp/touched.
Follow-ups (non-blocking — file as issues)
- Replace the branch probe with
fromJSON(steps.release.outputs.pr).headBranchName.release-please-action@v5exposes the PR head branch directly. Guessing the naming scheme will break again the next time Google renames the convention. Keep the probe only as a loud-failing fallback. exit 0when no branch exists hides a real contradiction. The step is gated onprs_created == 'true'— release-please claiming a PR while no branch exists on origin is the action lying to the workflow, not a benign no-op. Preferexit 1with the probed ref names, or at minimum::warning::so it surfaces in the run summary.- Add a release-please
--dry-runCI job gated on changes torelease-please-config.json/.release-please-manifest.json/.github/workflows/release-please.yml. Would have caught #877 pre-merge and would have confirmed this fix without waiting for the next push to main. Notable that this is the third release-plumbing PR in a row whose Validation checklist only proves the files are syntactically well-formed. - Close the bogus
adcp 6.0.0-beta.1release PR from #877 manually so release-please does not stay confused about whether it owns it.
Minor nits (non-blocking)
- No cross-check that the chosen
RELEASE_PR_BRANCHmatches the version release-please just bumped. If a stale component-suffixed branch lingers on origin, the probe picks it ahead of the live base branch andnormalize_pyproject_prerelease.pyrewrites the wrongpyproject.tomlbefore pushing. Low likelihood once #877 leftovers clear..github/workflows/release-please.yml:42-44.
LGTM. Follow-ups noted below.
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
include-component-in-tag: falseso manifest-mode Release Please looks for the existingvX.Y.Ztags instead ofadcp-vX.Y.Z.Why
After #877 switched to manifest mode, Release Please treated
package-name: adcpas the component for tag lookup and opened a bogus historical release PR foradcp 6.0.0-beta.1. The repo's existing release tags are componentless (v6.3.0-beta.4), so manifest mode needs to keep component names out of tags.Validation
python3 -c 'import json; json.load(open("release-please-config.json"))'ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release-please.yml")'git diff --checkgit commit