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: show API warnings when syncing Function CR by gauron99 · Pull Request #4092 · knative/func

Conversation

@gauron99

@gauron99 gauron99 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

func deploy creates or updates the Function CR with a controller-runtime client. Warnings from the API server went to controller-runtime's logger, which func never sets. The warning was lost, and once func had run for 30 seconds, controller-runtime printed a "log.SetLogger(...) was never called" stack trace right after a successful deploy.

The lost warning matters. func-operator main renamed spec.repository.branch and spec.repository.path to revision and dir. On a cluster with that CRD the server drops both fields with an "unknown field" warning, and the operator builds the default branch from the repo root while the user sees no reason why.

Print server warnings to stderr instead, deduplicated. The dialer and volume clients in pkg/k8s silence warnings with NoWarnings, but here a warning can report fields dropped from the CR, so it must stay visible.

Changes

/kind

Fixes #

Release Note


Docs


Sorry, something went wrong.

Uh oh!

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

All reactions
@knative-prow

knative-prow Bot commented Oct 19, 2026

Copy link
Copy Markdown

@gauron99: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

Details

In response to this:

func deploy creates or updates the Function CR with a controller-runtime client. Warnings from the API server went to controller-runtime's logger, which func never sets. The warning was lost, and once func had run for 30 seconds, controller-runtime printed a "log.SetLogger(...) was never called" stack trace right after a successful deploy.

The lost warning matters. func-operator main renamed spec.repository.branch and spec.repository.path to revision and dir. On a cluster with that CRD the server drops both fields with an "unknown field" warning, and the operator builds the default branch from the repo root while the user sees no reason why.

Print server warnings to stderr instead, deduplicated. The dialer and volume clients in pkg/k8s silence warnings with NoWarnings, but here a warning can report fields dropped from the CR, so it must stay visible.

Changes

/kind

Fixes #

Release Note


Docs


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 size/M 🤖 PR changes 30-99 lines, ignoring generated files. label Oct 19, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and jrangelramos October 19, 2026 20:54
@knative-prow knative-prow Bot added the approved 🤖 PR has been approved by an approver from all required OWNERS files. label Oct 19, 2026
@gauron99

gauron99 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/retest

All reactions

Sorry, something went wrong.

Uh oh!

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

@gauron99
gauron99 requested a lite review from Copilot October 20, 2026 07:05
Copilot started reviewing on behalf of gauron99 October 20, 2026 07:06
View session
Copilot AI reviewed Oct 20, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Add deduplication coverage and robust stderr cleanup in the test.

No open issues 🎉

What changed in this PR

Routes Kubernetes API warnings to stderr during Function CR synchronization and adds integration-style coverage.

Changes:

  • Configures deduplicating API warning handling.
  • Tests warning output during Function CR creation.
File Summary Review findings
pkg/​operator/​sync.go Configures API warnings to use stderr. Moderate: test deduplication across repeated warnings.
pkg/​operator/​sync_test.go Verifies warnings reach stderr. Moderate: safely restore and close stderr on test failures.

Review effort: Lite

Sorry, something went wrong.

Uh oh!

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

All reactions
@aliok

aliok commented Oct 22, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve

All reactions

Sorry, something went wrong.

Uh oh!

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

@knative-prow knative-prow Bot assigned aliok Oct 22, 2026
@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Oct 22, 2026
@gauron99
gauron99 force-pushed the push-wtvrrtqqpotn branch from 3ca645a to d5cd3b7 Compare October 22, 2026 10:48
@knative-prow knative-prow Bot removed the lgtm 🤖 PR is ready to be merged. label Oct 22, 2026
@gauron99
fix: show API warnings when syncing Function CR
684ee55
func deploy creates or updates the Function CR with a controller-runtime
client. Warnings from the API server went to controller-runtime's
logger, which func never sets. The warning was lost, and once func had
run for 30 seconds, controller-runtime printed a "log.SetLogger(...)
was never called" stack trace right after a successful deploy.

The lost warning matters. func-operator main renamed
spec.repository.branch and spec.repository.path to revision and dir.
On a cluster with that CRD the server drops both fields with an
"unknown field" warning, and the operator builds the default branch
from the repo root while the user sees no reason why.

Print server warnings to stderr instead, deduplicated. The dialer and
volume clients in pkg/k8s silence warnings with NoWarnings, but here a
warning can report fields dropped from the CR, so it must stay visible.
@gauron99
gauron99 force-pushed the push-wtvrrtqqpotn branch from d5cd3b7 to 684ee55 Compare October 22, 2026 11:18
@gauron99

gauron99 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

just rebased and updated

All reactions

Sorry, something went wrong.

Uh oh!

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

@aliok

aliok commented Oct 22, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve

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 Oct 22, 2026
@knative-prow

knative-prow Bot commented Oct 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, gauron99

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 [aliok,gauron99]

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.

@knative-prow
knative-prow Bot merged commit c2d6a2c into knative:main Oct 22, 2026
45 checks passed

Uh oh!

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

@gauron99
gauron99 deleted the push-wtvrrtqqpotn branch November 13, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@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

@aliok aliok

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. lgtm 🤖 PR is ready to be merged. size/M 🤖 PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@gauron99 @aliok
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.