feat: pin func-utils image to a per-release-branch tag - #3994
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
|
@matejvasek @lkingland WDYT? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauron99, lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🟡 Changes recommended
The current release-branch detection in the Makefile can fall back to v2 in detached-HEAD CI checkouts, undermining the intended per-branch pinning behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR makes func embed a more stable func-utils image tag per release branch/minor version to avoid older released CLIs being broken by changes published under a floating tag.
Changes:
- Derive
FUNC_UTILS_IMGfrom either an exact releaseKVERor arelease-X.Ybranch, otherwise defaulting tov2. - Align local e2e image publishing (
hack/images.sh) with the embedded image tag via a newmake func-utils-imagehelper. - Update docs and CI so
func-utilsimages are published asv2onmainandX.Yonrelease-X.Ybranches.
File summaries
| File | Description |
|---|---|
| Makefile | Derives and embeds a per-release-branch/per-minor func-utils image tag; adds func-utils-image helper target. |
| hack/images.sh | Publishes locally built func-utils images using the same tag embedded into the built func binary. |
| docs/README.md | Adds documentation link for the func-utils image policy. |
| docs/func-utils-image.md | Documents tag scheme and compatibility policy for func-utils. |
| .github/workflows/functions.yaml | Publishes func-utils as v2 on main and X.Y on release-X.Y, including manual dispatch support. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| FUNC_UTILS_TAG := $(shell \ | ||
| if echo "$(KVER)" | grep -qE '^(knative-)?v[0-9]+\.[0-9]+\.[0-9]+$$'; then \ | ||
| echo "$(KVER)" | sed -E 's/^(knative-)?v([0-9]+\.[0-9]+)\.[0-9]+$$/\2/'; \ | ||
| elif git branch --show-current 2>/dev/null | grep -qE '^release-[0-9]+\.[0-9]+$$'; then \ | ||
| git branch --show-current | sed -e 's/^release-//'; \ | ||
| else \ | ||
| echo v2; \ | ||
| fi) |
Automated Code Review
This PR pins the Findings1. Broad release-branch gate vs. strict tag regex — 2. Detached-HEAD fallback yields floating 3. 4. 5. Scope creep: deleted "Fork CI note" — 6. Redundant 7. Inaccurate KVER comment — Highest-value items: #1 (workflow fails red instead of skipping) and #2 (pin silently defeated in detached-HEAD builds). |
proposal: pin func-utils img per release so that atleast per branch we have a more stable func-utils so we are not constantly breaking older functions because of the dynamic tag we currently have everywhere