Repository navigation
feat: pin func-utils image to a per-release-branch tag #3994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
knative-prow
merged 1 commit into
knative:main
from
gauron99:pin-func-utils-per-release
Oct 28, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Update func-utils image to next release | ||
|
|
||
| # Main carries the func-utils image of the next minor release, so a branch | ||
| # release-X.Y cut from it already embeds func-utils:X.Y, and main's pushes | ||
| # have published it (see docs/func-utils-image.md). Cutting release-X.Y opens | ||
| # a PR that moves main to the next minor, X.(Y+1). Until it merges, main | ||
| # publishes no func-utils image. | ||
|
|
||
| on: | ||
| # create has no branch filter; the job's if drops every other branch and tag. | ||
| create: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| bump-utils-image: | ||
| name: Bump Utils Image | ||
| if: github.ref_type == 'branch' && startsWith(github.ref_name, 'release-') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| ref: main | ||
| - name: Move to Next Minor | ||
| id: next | ||
| # release-1.24 moves main from func-utils:1.24 to 1.25. If main is on | ||
| # another minor (a re-cut or an old branch), sed changes nothing and no | ||
| # PR opens. | ||
| run: | | ||
| cut="${GITHUB_REF_NAME#release-}" | ||
| next="${cut%.*}.$(( ${cut#*.} + 1 ))" | ||
| sed -i "s|func-utils:${cut}\"|func-utils:${next}\"|" pkg/version/version.go | ||
| echo "tag=${next}" >> "$GITHUB_OUTPUT" | ||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ github.token }} | ||
| commit-message: 'chore: bump func-utils image to ${{ steps.next.outputs.tag }} after new release branch cut' | ||
| title: 'Bump func-utils image to ${{ steps.next.outputs.tag }}' | ||
| body: | | ||
| `${{ github.ref_name }}` was cut, so main moves on to the func-utils image of the next minor release, `ghcr.io/knative/func-utils:${{ steps.next.outputs.tag }}`. Until this merges, main publishes no func-utils image. See [docs/func-utils-image.md](https://github.com/${{ github.repository }}/blob/main/docs/func-utils-image.md). | ||
|
|
||
| This PR was automatically generated by the [Update func-utils image workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}). | ||
| branch: bump-func-utils-${{ steps.next.outputs.tag }} | ||
| delete-branch: true | ||
| committer: Knative Automation <automation@knative.team> | ||
| author: Knative Automation <automation@knative.team> | ||
| assignees: gauron99, matejvasek, lkingland | ||
| base: main |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # The func-utils image | ||
|
|
||
| `ghcr.io/knative/func-utils` holds `cmd/func-util`, which func runs in the | ||
| cluster: Tekton build steps, the socat dialer and the volume upload. Each | ||
| func CLI embeds one tag of it. | ||
|
|
||
| ## Tags | ||
|
|
||
| | Tag | Used by | | ||
| | --- | --- | | ||
| | `latest` | CLIs before 2025. Frozen. | | ||
| | `v2` | CLIs up to 1.23. Frozen. | | ||
| | `X.Y` | CLIs `vX.Y.*`. Published from `release-X.Y`, and from `main` while `X.Y` is in development. | | ||
|
|
||
| Ideally we would not backport to `release-X.Y` a change that breaks how the CLI | ||
| calls the image: arguments, exit codes, parsed output or shared files. | ||
| In most cases the latest `X.Y` image will work with every `vX.Y.*` CLI. | ||
|
|
||
| ## Where the tag lives | ||
|
|
||
| `FuncUtilsImage` in `pkg/version/version.go`. `make func-utils-image` | ||
| prints what a build embeds. To embed another image, set `FUNC_UTILS_IMG`. | ||
|
|
||
| ## Release cut | ||
|
|
||
| `main` embeds the minor in development, say `1.24`, and every green push | ||
| publishes `:1.24`. When `release-1.24` is cut: | ||
|
|
||
| 1. The branch already embeds `:1.24`, and the image exists, so the | ||
| release can go. `hack/release.sh` refuses a `v1.24.z` release | ||
| otherwise. | ||
| 2. `.github/workflows/update-func-utils-image.yaml` opens a PR that moves | ||
| `main` to `1.25`. Until it merges, `main` stops publishing `:1.24`, | ||
| except for the cut commit itself. | ||
| 3. Every green push to `release-1.24` (a backport) publishes `:1.24`. | ||
|
|
||
| If `:1.24` holds the wrong image, re-run the Functions run for the | ||
| newest commit on `release-1.24`. | ||
|
|
||
| If `main` still embeds `1.24` when `release-1.25` is cut, set | ||
| `FuncUtilsImage` to `ghcr.io/knative/func-utils:1.25` on `release-1.25` | ||
| and to `:1.26` on `main`. |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| package version | ||
|
|
||
| var Vers, Kver, Hash string | ||
|
|
||
| // FuncUtilsImage is the func-utils image that func runs in the cluster: the | ||
| // minor in development on main, X.Y on release-X.Y. Builds can override it | ||
| // (FUNC_UTILS_IMG in the Makefile). When release-X.Y is cut, the workflow | ||
| // update-func-utils-image.yaml moves main to the next minor; see | ||
| // docs/func-utils-image.md. | ||
| const FuncUtilsImage = "ghcr.io/knative/func-utils:1.24" |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.