chore: streamline release workflows and CLI build versioning#2131
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe pull request decouples build versioning from release versioning by introducing a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rkflow job summary. On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
…mponent-model#2131) ## Summary - **Remove `branch` input** from `cli-release.yml` and `controller-release.yml`. The workflow_dispatch UI already has a branch selector (`github.ref_name`), making the redundant text input a source of inconsistency. Branch validation stays in `parseBranch()` inside `release-candidate-version.yml`. - **Trim RC version summary table** in `release-versioning.js` from 11 to 6 fields, dropping values that are either derivable from other fields or only useful for debugging (still logged via `core.info()`). - **Add `build_version` input** to `cli.yml` and wire it through `cli/Taskfile.yml` so the version embedded in ldflags can be overridden independently of the CTF/release version. Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> Co-authored-by: Fabian Burth <fabian.burth@sap.com>
## Summary - **Fix publish gating in `cli.yml`**: When called via `workflow_call` from `cli-release.yml`, `GITHUB_REF_NAME` inherits the caller's ref (`releases/v0.4`) instead of the RC tag (`cli/v0.4.0-rc.1`). The `should_push_oci_image` check only matched `main` or `cli/v*`, so the Publish and Attest job was skipped for releases dispatched from release branches. Now uses `inputs.ref` when available. - **Update `RELEASE_PROCESS.md`**: Replace stale "Branch to release from" input reference with the "Use workflow from" branch selector, matching the workflow change in #2131. ## Root Cause After #2131 removed the explicit `branch` text input from `cli-release.yml`, the operator must select the `releases/v*` branch in the GitHub UI "Use workflow from" dropdown. This sets `GITHUB_REF_NAME = "releases/v0.4"` for the entire call chain. `cli.yml`'s branch-check (`should_push_oci_image`) tests `GITHUB_REF_NAME` against: 1. Default branch (`main`) — no match 2. `cli/v*` tag pattern — no match Result: Publish and Attest skipped → Conformance skipped. The v0.3 release worked because the old workflow was dispatched from `main` (the text input carried the branch separately), so `GITHUB_REF_NAME = "main"` matched condition 1. ## Fix Use `inputs.ref` (the RC tag, e.g. `cli/v0.4.0-rc.1`) when present, fall back to `GITHUB_REF_NAME` for direct triggers. The RC tag matches the `cli/v*` pattern, enabling publish. | Trigger | `inputs.ref` | Effective ref | Publishes | |---------|-------------|---------------|-----------| | `workflow_call` from `cli-release.yml` | `cli/v0.4.0-rc.1` | `cli/v0.4.0-rc.1` | Yes | | Push to `main` | empty | `main` | Yes | | Push tag `cli/v0.4.0` | empty | `cli/v0.4.0` | Yes | | Push to `releases/v0.4` | empty | `releases/v0.4` | No (build-only) | | Pull request | n/a | step skipped | No | ## Test plan - [ ] Verify the v0.4 release workflow can be re-run successfully from `releases/v0.4` after this change is cherry-picked - [ ] Dry-run a CLI release from a release branch to confirm Publish and Attest job is no longer skipped --------- Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
…ponent-model#2297) ## Summary - **Fix publish gating in `cli.yml`**: When called via `workflow_call` from `cli-release.yml`, `GITHUB_REF_NAME` inherits the caller's ref (`releases/v0.4`) instead of the RC tag (`cli/v0.4.0-rc.1`). The `should_push_oci_image` check only matched `main` or `cli/v*`, so the Publish and Attest job was skipped for releases dispatched from release branches. Now uses `inputs.ref` when available. - **Update `RELEASE_PROCESS.md`**: Replace stale "Branch to release from" input reference with the "Use workflow from" branch selector, matching the workflow change in open-component-model#2131. ## Root Cause After open-component-model#2131 removed the explicit `branch` text input from `cli-release.yml`, the operator must select the `releases/v*` branch in the GitHub UI "Use workflow from" dropdown. This sets `GITHUB_REF_NAME = "releases/v0.4"` for the entire call chain. `cli.yml`'s branch-check (`should_push_oci_image`) tests `GITHUB_REF_NAME` against: 1. Default branch (`main`) — no match 2. `cli/v*` tag pattern — no match Result: Publish and Attest skipped → Conformance skipped. The v0.3 release worked because the old workflow was dispatched from `main` (the text input carried the branch separately), so `GITHUB_REF_NAME = "main"` matched condition 1. ## Fix Use `inputs.ref` (the RC tag, e.g. `cli/v0.4.0-rc.1`) when present, fall back to `GITHUB_REF_NAME` for direct triggers. The RC tag matches the `cli/v*` pattern, enabling publish. | Trigger | `inputs.ref` | Effective ref | Publishes | |---------|-------------|---------------|-----------| | `workflow_call` from `cli-release.yml` | `cli/v0.4.0-rc.1` | `cli/v0.4.0-rc.1` | Yes | | Push to `main` | empty | `main` | Yes | | Push tag `cli/v0.4.0` | empty | `cli/v0.4.0` | Yes | | Push to `releases/v0.4` | empty | `releases/v0.4` | No (build-only) | | Pull request | n/a | step skipped | No | ## Test plan - [ ] Verify the v0.4 release workflow can be re-run successfully from `releases/v0.4` after this change is cherry-picked - [ ] Dry-run a CLI release from a release branch to confirm Publish and Attest job is no longer skipped --------- Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> aa48cc6
Summary
branchinput fromcli-release.ymlandcontroller-release.yml. The workflow_dispatch UI already has a branch selector (github.ref_name), making the redundant text input a source of inconsistency. Branch validation stays inparseBranch()insiderelease-candidate-version.yml.release-versioning.jsfrom 11 to 6 fields, dropping values that are either derivable from other fields or only useful for debugging (still logged viacore.info()).build_versioninput tocli.ymland wire it throughcli/Taskfile.ymlso the version embedded in ldflags can be overridden independently of the CTF/release version.