Skip to content

release: fix release-branch base by saving release-commit digest early#1655

Merged
ccwienk merged 1 commit into
masterfrom
fix/version-action-capture-commit-clobber
Jul 2, 2026
Merged

release: fix release-branch base by saving release-commit digest early#1655
ccwienk merged 1 commit into
masterfrom
fix/version-action-capture-commit-clobber

Conversation

@ccwienk

@ccwienk ccwienk commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

When releasing with create-release-branch: true and next-version: bump-minor, the release
action calls the version action twice in the same job — once with repository-operation: capture-commit (release commit) and once with commit-to-head (bump commit). The second call
unconditionally overwrites refs/capture-commit with the bump commit's SHA (e.g. 1.51.0-dev).

The subsequent reset-repository-to-release-commit step then resets to that wrong base, so the
release-branch bump-patch commit lands on top of 1.51.0-dev1.51.1-dev instead of the
intended 1.50.01.50.1-dev.

Fix: read refs/capture-commit into a step output before calling the release action, and use
that saved digest in the reset step instead of re-reading the (by then clobbered) ref.

Test plan

  • Trigger a bump-minor release with create-release-branch: true and verify the release
    branch is based on the release commit (e.g. 1.50.01.50.1-dev), not the bump commit.

@gardener-prow gardener-prow Bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 2, 2026
@ccwienk ccwienk force-pushed the fix/version-action-capture-commit-clobber branch from fdc245f to 8f361c6 Compare July 2, 2026 12:36
@ccwienk ccwienk force-pushed the fix/version-action-capture-commit-clobber branch from 8f361c6 to ed33d2e Compare July 2, 2026 12:42
@gardener-prow gardener-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 2, 2026
@gardener-prow gardener-prow Bot added the cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. label Jul 2, 2026
refs/capture-commit is overwritten when the release action calls version
with commit-to-head for the bump-commit. Read the digest into a step
output before the release action runs, and use it in the reset step.
@ccwienk ccwienk force-pushed the fix/version-action-capture-commit-clobber branch from ed33d2e to 0fd62cd Compare July 2, 2026 12:49
@ccwienk ccwienk changed the title version: skip capture-commit step for commit-to-head operations release: fix release-branch base by saving release-commit digest early Jul 2, 2026
@gardener-prow

gardener-prow Bot commented Jul 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TuanAnh17N

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@gardener-prow

gardener-prow Bot commented Jul 2, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 814a93e5a6b459067308003cb719430abb4438d3

@gardener-prow gardener-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 2, 2026
@ccwienk ccwienk merged commit 548826e into master Jul 2, 2026
22 of 23 checks passed
@ccwienk ccwienk deleted the fix/version-action-capture-commit-clobber branch July 2, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants