Registry Mirror
Skip to content

Conversation

@anjalirj27

Copy link
Copy Markdown
Contributor

Changes

  • 🐛 func config ci now lists exactly the GitHub Secrets and Variables the generated workflow uses. With registry login it no longer asks for vars.REGISTRY_URL, which the workflow doesn't use; without registry login it now asks for vars.REGISTRY_URL, which the workflow needs for FUNC_REGISTRY. Applies to the post-export message and the --verbose output.
  • 🧹 Rename the message templates from *Many*/*One* to *WithLogin*/*WithoutLogin*, since the no-login list now has two entries.

/kind bug

Fixes #4229

Why: a user who followed the message with --registry-login=false never created REGISTRY_URL, so the workflow ran with an empty FUNC_REGISTRY and failed with registry required. Reproduction is in #4229.

Testing:

  • New TestCIGenerator_MessageListsWorkflowSecretsAndVars: for registry login on/off and normal/verbose output, the secrets.* / vars.* names in the message must equal those in the generated workflow. Run against the old printer.go, all four cases fail, showing the extra vars.REGISTRY_URL with login and the missing one without.
  • Updated the existing message tests for the corrected lists.
  • go test ./pkg/ci/... ./cmd/ -run ConfigCI passes. golangci-lint run ./pkg/ci/... reports 0 issues. A full make check reports 9 pre-existing staticcheck findings in files this PR doesn't touch (cmd/deploy_test.go, cmd/logs_test.go, pkg/git/gitlab, pkg/lister/testing); they appear on main as well.
  • Manual: with func built from this branch, func config ci --registry-login=true lists KUBECONFIG, REGISTRY_PASSWORD, REGISTRY_LOGIN_URL, REGISTRY_USERNAME; --registry-login=false lists KUBECONFIG, REGISTRY_URL, matching FUNC_REGISTRY in each workflow.

Release Note

`func config ci` now lists the GitHub Secrets and Variables the generated workflow actually uses, including REGISTRY_URL when registry login is disabled.

Docs


func config ci told users to create vars.REGISTRY_URL when registry login was enabled, where the workflow does not use it, and left it out when registry login was disabled, where the workflow needs it for FUNC_REGISTRY. A workflow set up from the message then failed with "registry required".

List exactly the secrets and variables the workflow uses, in both the post-export message and the verbose output, and add a test that checks the message against the generated workflow.

Fixes knative#4229
@knative-prow knative-prow Bot added the kind/bug Bugs label Nov 30, 2026
@knative-prow

knative-prow Bot commented Nov 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: anjalirj27
Once this PR has been reviewed and has the lgtm label, please assign aliok for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@knative-prow knative-prow Bot added size/M 🤖 PR changes 30-99 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels Nov 30, 2026
@knative-prow

knative-prow Bot commented Nov 30, 2026

Copy link
Copy Markdown

Hi @anjalirj27. 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.

Regular contributors should join the org to skip this step.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Bugs needs-ok-to-test 🤖 Needs an org member to approve testing size/M 🤖 PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

func config ci: the required secrets/variables message doesn't match the generated workflow

1 participant