GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: source func CLI version from build ldflags by pmeida · Pull Request #4029 · knative/func

Conversation

@pmeida

@pmeida pmeida commented Sep 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Changes

  • Source FuncCliVersion from version.Kver (set via ldflags at build time) instead of a hardcoded string
  • Strip the git describe suffix (e.g. -22-g2871d3bf) so dev builds between releases emit the nearest real release tag
  • Expose FuncCliVersion as a field on WorkflowConfig so library consumers can override it directly
    • this is important because library consumers with no ldflags have empty version.Kver, so it falls back to DefaultFuncCliVersion which may be out of date as it has to be manually updated

/kind bug

Fixes #4028

Release Note

`func config ci` now sources the func CLI version used in generated GitHub Actions workflows from the binary's build-time version (set via ldflags), instead of a hardcoded string. Dev builds between releases emit the nearest real release tag by stripping the git describe suffix.

Docs


Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@knative-prow knative-prow Bot added kind/bug Bugs size/S 🤖 PR changes 10-29 lines, ignoring generated files. labels Sep 1, 2026
@knative-prow

knative-prow Bot commented Sep 1, 2026

Copy link
Copy Markdown

Hi @pmeida. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added the needs-ok-to-test 🤖 Needs an org member to approve testing label Sep 1, 2026
@pmeida pmeida changed the title config ci: source func CLI version from build ldflags fix: source func CLI version from build ldflags Sep 1, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and jrangelramos September 1, 2026 12:08
@matejvasek

matejvasek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/approve
/lgtm

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot assigned matejvasek Sep 1, 2026
@knative-prow knative-prow Bot added lgtm 🤖 PR is ready to be merged. approved 🤖 PR has been approved by an approver from all required OWNERS files. labels Sep 1, 2026
@pmeida
fix: source CI workflow func version from build
0cbe88e
The func CLI version in generated GitHub workflows was hardcoded
to a specific release (knative-v1.22.0), meaning it would silently
go stale as new releases shipped.

FuncCliVersion is now sourced from version.Kver, which is set via
ldflags at build time to the current release tag. The git describe
suffix (e.g. "-22-g2871d3bf") is stripped so that dev builds between
releases still emit a real, installable tag rather than a ref that
does not exist on GitHub releases.

When version.Kver is empty (plain go build without ldflags, or the
package used as a library), the field falls back to
DefaultFuncCliVersion.
@pmeida
pmeida force-pushed the feat/ci-func-cli-version-from-build branch from a6b4f2d to 0cbe88e Compare September 1, 2026 12:38
@knative-prow knative-prow Bot removed the lgtm 🤖 PR is ready to be merged. label Sep 1, 2026
@pmeida

pmeida commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@matejvasek It should be backported to release 4.23 right?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matejvasek

matejvasek commented Sep 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Yeah, we will charrypick it to release 1.23.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matejvasek

matejvasek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/approve
/lgtm

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Sep 1, 2026
@knative-prow

knative-prow Bot commented Sep 1, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matejvasek, pmeida

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:
  • OWNERS [matejvasek]

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matejvasek

matejvasek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/cherry-pick release-1.23

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow-robot

knative-prow-robot commented Sep 1, 2026

Copy link
Copy Markdown

@matejvasek: once the present PR merges, I will cherry-pick it on top of release-1.23 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matejvasek

matejvasek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test 🤖 Needs an org member to approve testing labels Sep 1, 2026
@knative-prow
knative-prow Bot merged commit d327dce into knative:main Sep 1, 2026
64 of 71 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow-robot

knative-prow-robot commented Sep 1, 2026

Copy link
Copy Markdown

@matejvasek: new pull request created: #4030

Details

In response to this:

/cherry-pick release-1.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow-robot knative-prow-robot mentioned this pull request Sep 1, 2026
[release-1.23] fix: source func CLI version from build ldflags #4030
Merged
This was referenced Sep 1, 2026
test: pin func CLI version so config CI workflow test is deterministic #4034
Merged
SRVOCF-1079: Control func cli version installed in workflow openshift/faas-console-plugin#179
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dsimansk dsimansk Awaiting requested review from dsimansk
@jrangelramos jrangelramos Awaiting requested review from jrangelramos

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@matejvasek matejvasek

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/bug Bugs lgtm 🤖 PR is ready to be merged. ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. size/S 🤖 PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

config ci: source func CLI version from build ldflags

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@pmeida @matejvasek @knative-prow-robot
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.