Skip to content

chore: Bump golang dependencies in backend & controller - #1306

Merged
google-oss-prow[bot] merged 5 commits into
kubeflow:notebooks-v2from
christian-heusel:chore/bump-go-deps
Aug 23, 2026
Merged

chore: Bump golang dependencies in backend & controller#1306
google-oss-prow[bot] merged 5 commits into
kubeflow:notebooks-v2from
christian-heusel:chore/bump-go-deps

Conversation

@christian-heusel

@christian-heusel christian-heusel commented Aug 5, 2026

Copy link
Copy Markdown
Member

Notable changes

workspaces/backend/internal/auth/authentication.go:

  • headerrequest.New() gained a new uidHeaders []string parameter upstream
    in k8s.io/apiserver. Updated the call site to pass nil for it since it's
    unused (auth is keyed on name/group headers only).

workspaces/controller/internal/webhook/workspace_webhook.go / workspacekind_webhook.go

controller-runtime v0.24 made the webhook builder generic:

  • ctrl.NewWebhookManagedBy(mgr).For(&T{})ctrl.NewWebhookManagedBy(mgr, &T{})
  • admission.Validator methods (ValidateCreate/Update/Delete) now take the concrete type (*Workspace, *WorkspaceKind) directly instead of runtime.Object, so the manual obj.(*T) type assertions + apierrors.NewBadRequest fallback were dropped — that check is now enforced by the compiler instead of at request time (type mismatches are caught by the compiler; runtime failures are now JSON-decode errors, not type-assertion errors — see sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go).

workspaces/controller/internal/helper/probe.go:

  • Switch import k8s.io/apimachinery/pkg/util/httpstreamk8s.io/streaming/pkg/httpstream

workspaces/controller/internal/controller/workspace_activity_test.go &

  • nolint the Result.Requeue deprecation (will open another task to refactor this deprecated type out)

@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Notebooks Aug 5, 2026
@google-oss-prow google-oss-prow Bot added do-not-merge/work-in-progress area/backend area - related to backend components labels Aug 5, 2026
@google-oss-prow google-oss-prow Bot added area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 size/XXL labels Aug 5, 2026
@christian-heusel
christian-heusel marked this pull request as ready for review August 5, 2026 15:43
@christian-heusel

Copy link
Copy Markdown
Member Author

/cc @aojea
who also did a few dependency updates in #1301

@google-oss-prow

Copy link
Copy Markdown

@christian-heusel: GitHub didn't allow me to request PR reviews from the following users: aojea.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @aojea
who also did a few dependency updates in #1301

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/test-infra repository.

@aojea

aojea commented Aug 5, 2026

Copy link
Copy Markdown

/lgtm

@google-oss-prow

Copy link
Copy Markdown

@aojea: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

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/test-infra repository.

@andyatmiami andyatmiami left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @christian-heusel - I have one suggestion here from reviewing the various change logs across these version bumps...


controller-runtime v0.21: client-side rate limiter removed

Starting with controller-runtime v0.21, the default client-side rate limiter (QPS=20, Burst=30) was disabled by default — the rest config now ships with no client-side rate limiting.

Backend: Already mitigated. cmd/main.go explicitly sets kubeconfig.QPS and kubeconfig.Burst from env vars (defaults: QPS=50, Burst=100).

Controller: Uses ctrl.GetConfigOrDie() at cmd/main.go:123 without setting explicit QPS/Burst on the rest config. After this bump, the controller will have no client-side rate limiting on API calls. The API server's server-side priority & fairness provides some protection, but under heavy load (many workspaces reconciling simultaneously) the controller may generate more concurrent API requests than before.

Purely out of paranoia - seems like maybe we should configure the controller similarly to the backend - but note as I say this - I'm not fully appreciative of the ramifications here... feel free to push back

Note: The RateLimiter at cmd/main.go:176/191 is the workqueue rate limiter (controls reconcile requeue timing), not the Kubernetes API client rate limiter.

@aojea

aojea commented Aug 22, 2026

Copy link
Copy Markdown

Purely out of paranoia - seems like maybe we should configure the controller similarly to the backend - but note as I say this - I'm not fully appreciative of the ramifications here... feel free to push back

good catch , I think the importance of this parameters is on the number of write requests the controller does, how many objects it updates and creates , so having client side enable always help to avoid storming the apiserver and being consistent across the project seems a good call

christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Aug 23, 2026
controller-runtime deprecates Result.Requeue in favor of RequeueAfter /
returning an error (see the v0.24.1 field docs). The dependency bump in
kubeflow#1306 moves the controller to a version where staticcheck flags every
usage as SA1019, so this proactively removes them (the change is valid on
the current controller-runtime v0.19.1 too).

This replaces every usage in the controller reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that Requeue: true provided.
- Stale-cache sites (ServiceAccount not yet in the cache) rely on the
  Owns(ServiceAccount) watch to requeue, matching the existing comments.
- mergeReconcileResult drops its .Requeue handling and now merges purely
  on RequeueAfter; its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at V(2).

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
Bump k8s.io libraries, controller-runtime, ginkgo/gomega, and their
transitive deps.

Fix `headerrequest.New` call in internal/auth for its new `uidHeaders`
parameter, and regenerate the OpenAPI spec to pick up the resulting
upstream API changes.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
Bump k8s.io libraries, controller-runtime, istio.io/api and
istio.io/client-go, and their transitive deps, to match the versions
used in workspaces/backend.

Also switch NewWebhookManagedBy/admission.Validator usage in
workspace_webhook.go and workspacekind_webhook.go to the typed API
instead of manually type-asserting runtime.Object.

Regenerate the WorkspaceKind CRD for new upstream corev1 fields.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
controller-runtime v0.21 removed the default client-side rate limiter
(QPS=20, Burst=30), so the controller's Kubernetes API client no longer
has any client-side rate limiting after the dependency bump. Mirror the
backend by setting QPS/Burst explicitly on the rest.Config, configurable
via --client-qps/CLIENT_QPS (default 50) and --client-burst/CLIENT_BURST
(default 100).

REFERENCE: kubernetes-sigs/controller-runtime#3119

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Aug 23, 2026
controller-runtime deprecates Result.Requeue in favor of RequeueAfter /
returning an error (see the v0.24.1 field docs). The dependency bump in
kubeflow#1306 moves the controller to a version where staticcheck flags every
usage as SA1019, so this proactively removes them (the change is valid on
the current controller-runtime v0.19.1 too).

This replaces every usage in the controller reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that Requeue: true provided.
- Stale-cache sites (ServiceAccount not yet in the cache) rely on the
  Owns(ServiceAccount) watch to requeue, matching the existing comments.
- mergeReconcileResult drops its .Requeue handling and now merges purely
  on RequeueAfter; its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at V(2).

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
@christian-heusel
christian-heusel marked this pull request as draft August 23, 2026 15:55
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Aug 23, 2026
`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in kubeflow#1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
…pimachinery import

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Aug 23, 2026
`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in kubeflow#1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
Fixing it will involve more care and work than appropriate to this
dependency bump PR, hence we'll defer this refactor to another task.

Signed-off-by: Christian Heusel <christian@heusel.eu>
@christian-heusel
christian-heusel marked this pull request as ready for review August 23, 2026 16:47
@google-oss-prow
google-oss-prow Bot requested a review from andyatmiami August 23, 2026 16:47

@andyatmiami andyatmiami left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve


thanks @christian-heusel - really appreciate you always pushing and staying on top of the little details like dependency versions to make Kubeflow Workspaces awesome and enterprise ready.

from reviewing the change logs for the dependencies being updated - and the minimal changes you delivered to account for these dep upgrades - I think this is looking good and ready to be merged...

timing wise - as we just shipping the beta - this is also the best time to do work like this.. in the event we missed some weird/subtle thing - we'll have plenty of time to find it (or let community find it) - and be better position for our GA near EOY!


testing methodology:

@google-oss-prow google-oss-prow Bot added the lgtm label Aug 23, 2026
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyatmiami

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:

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

@google-oss-prow
google-oss-prow Bot merged commit 4802939 into kubeflow:notebooks-v2 Aug 23, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Kubeflow Notebooks Aug 23, 2026
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Aug 24, 2026
`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in kubeflow#1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Aug 28, 2026
`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in kubeflow#1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Sep 2, 2026
`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in kubeflow#1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
christian-heusel added a commit to christian-heusel/notebooks that referenced this pull request Sep 3, 2026
`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in kubeflow#1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>
google-oss-prow Bot pushed a commit that referenced this pull request Sep 3, 2026
…#1348)

* refactor: replace deprecated Result.Requeue in controller reconcilers

`controller-runtime` deprecates `reconcile.Result.Requeue` in favor of
`RequeueAfter` / returning an error. The dependency bump in #1306 moves
the controller to `controller-runtime v0.24.1`, where `staticcheck`
flags **every** `Result{Requeue: true}` usage as `SA1019`:

    This setting is deprecated as it causes confusion and there is no
    good reason to use it. When waiting for an external event to happen,
    either the duration until it is supposed to happen or an appropriate
    poll interval should be used, rather than an interval emitted by a
    ratelimiter whose purpose it is to control retry on error.
    Deprecated: Use `RequeueAfter` instead.

Therefore this change replaces every usage in the controller
reconcilers:

- Conflict-retry sites now return the conflict error so the workqueue
  rate-limiter handles retry-on-error (its documented purpose), which
  preserves the same rate-limited backoff that `Requeue: true` provided.
- Stale-cache sites (`ServiceAccount` not yet in the cache) rely on the
  `Owns(ServiceAccount)` watch to requeue, matching the existing
  comments.
- `mergeReconcileResult` drops its `.Requeue` handling and now merges
  purely on `RequeueAfter` its unit test is updated accordingly.

Tradeoff for discussion: conflict errors are now surfaced by
controller-runtime at error level rather than staying quiet at `V(2)`.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Christian Heusel <christian@heusel.eu>

* fix: requeue with a fixed delay on stale ServiceAccount cache

Addresses review feedback on the stale-cache handling: relying on the
`Owns(ServiceAccount)` watch to requeue is not guaranteed, because a
ServiceAccount with the deterministic name that is owned by another
controller will never be mapped back to this Workspace. Requeue with a
small fixed `RequeueAfter` instead: a stale cache is common and is not
write contention, so no exponential backoff is needed.

Assisted-by: Qwen3.8-27B
Signed-off-by: Christian Heusel <christian@heusel.eu>

---------

Signed-off-by: Christian Heusel <christian@heusel.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved area/backend area - related to backend components area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 lgtm size/XXL

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants