Skip to content

fix(hosting-kubernetes): update KubernetesClient to 21.0.8 - #11503

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
nZeus:kubernetesclient-21
Oct 21, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
nZeus:kubernetesclient-21

Conversation

@nZeus

@nZeus nZeus commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Microsoft.Orleans.Hosting.Kubernetes was compiled against KubernetesClient 18.0.13 with an open-ended dependency range. Applications referencing KubernetesClient 21.x could restore cleanly but fail during silo startup with MissingMethodException in KubernetesClusterAgent.OnStart, because KubernetesClient's generated pod-operation signatures changed between major versions.

Update KubernetesClient to 21.0.8 and constrain the package dependency to [21.0.8,22.0.0). Orleans now compiles against the current generated signatures, and NuGet can flag applications selecting a future major outside the supported range. KubernetesClient 21.0.8 provides native net8.0 and net10.0 assets and is available from the repository's configured package feed.

The branch is rebased onto current main, preserving the existing MessagePack update. No Kubernetes hosting source or public API changes are required.

@ReubenBond

Copy link
Copy Markdown
Member

Thanks for opening. Yep, KubernetesClient's continual API breaks are pretty annoying :) Will merge once checks pass, etc

Copilot AI 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.

🔵 Needs a closer look

The major-version upgrade still needs confirmed configured-feed restore and compatibility validation across supported frameworks.

0 open findings

What changed in this PR

Updates Orleans Kubernetes hosting to compile against KubernetesClient 21.x, addressing the reported startup failure when applications use newer client versions.

Changes:

  • Raises the centrally managed KubernetesClient version from 18.0.13 to 21.0.8.
File Description
Directory.Packages.props Updates the KubernetesClient dependency version.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nZeus

nZeus commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

@ReubenBond the CI failures are a restore failure, not a build problem: packagefeedproxy.microsoft.io (the only source in the repo's NuGet.Config) does not serve KubernetesClient 21.0.8 yet.

Reproduced against the feed with an empty package folder (dotnet restore src/Orleans.Hosting.Kubernetes/Orleans.Hosting.Kubernetes.csproj --packages <empty-dir> --force):

error NU1102: Unable to find package KubernetesClient with version (>= 21.0.8)
error NU1102:   - Found 289 version(s) in nuget.org [ Nearest version: 19.0.2 ]

The feed's flat2/kubernetesclient/index.json lists 289 versions ending at 19.0.2; no 20.x or 21.x version is present (21.0.8 was published to nuget.org on 2026-10-13). Pinning 19.0.2 would not help: its ListNamespacedPodAsync / WatchListNamespacedPodAsync signatures are identical to 18.0.13 (the shardSelector parameter that breaks binary compatibility arrives in 20.x/21.x), so a build against 19.0.2 would still throw the same MissingMethodException next to 21.x.

Two ways forward, your call:

  1. Have 21.0.8 (or whatever the feed needs) mirrored into the proxy feed, then re-run checks. The branch needs no code change; it compiles clean against 21.0.8 and every member KubernetesClusterAgent uses still exists there.
  2. Make the package feed-independent: keep the pin at 18.0.13 and route the five pod calls in KubernetesClusterAgent through Kubernetes.SendRequest<T> / CreateResultAsync<T>, whose signatures are the same in 18, 19 and 21. That changes the PR's scope and needs a test against a fake API server, so I would rather not do it unless you prefer it.

Branch is rebased locally on current main (68e5f18); I will push once the feed serves the package so the re-run is meaningful.

nZeus and others added 2 commits October 21, 2026 08:40
Microsoft.Orleans.Hosting.Kubernetes is compiled against KubernetesClient 18.0.13
and declares the dependency as [18.0.13, ). Consumers that reference a newer major
restore without a warning, but KubernetesClusterAgent.OnStart then fails with
MissingMethodException on k8s.CoreV1OperationsExtensions.ListNamespacedPodAsync,
because the generated extension-method signatures change between majors.
The sources compile unchanged against 21.0.8.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@ReubenBond
ReubenBond requested a balanced review from Copilot October 21, 2026 16:26
@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 83.88% (120,225 / 143,327)
Branches 73.63% (35,927 / 48,794)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested ed59b18, not current main 3fe31e2.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

Copilot AI 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.

🔵 Needs a closer look

The major dependency upgrade lacks build, package compatibility, and Kubernetes startup validation evidence.

No open issues 🎉

Review effort: Balanced

@ReubenBond
ReubenBond merged commit fe21add into dotnet:main Oct 21, 2026
94 checks passed
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 21, 2026
Restore dotnet#11503 as merged: compile against KubernetesClient 21.0.8 and constrain resolution to [21.0.8,22.0.0). The earlier 18.x-only cap was a separate backport policy rather than that PR's runtime compatibility fix.
ReubenBond pushed a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
)

Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Reuben Bond <[email protected]>
(cherry picked from commit fe21add)

Use the upstream KubernetesClient 21.0.8 upgrade with its [21.0.8,22.0.0) range and document the matching generated pod APIs.

Upstream-PR: dotnet#11503
Upstream-Commit: fe21add
ReubenBond pushed a commit that referenced this pull request Oct 23, 2026
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Reuben Bond <[email protected]>
(cherry picked from commit fe21add)

Use the upstream KubernetesClient 21.0.8 upgrade with its [21.0.8,22.0.0) range and document the matching generated pod APIs.

Upstream-PR: #11503
Upstream-Commit: fe21add
@nZeus
nZeus deleted the kubernetesclient-21 branch November 3, 2026 14:52
This was referenced Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants