Skip to content

Conversation

tg123
Copy link
Member

@tg123 tg123 commented Oct 15, 2025

this fix #1672

@Copilot Copilot AI review requested due to automatic review settings October 15, 2025 08:37
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 15, 2025
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 15, 2025
Copy link
Contributor

@Copilot 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 reverts IntOrString and ResourceQuantity from struct to class types and adds null safety handling in their YAML converters. The changes address issue #1672 which likely involved null reference exceptions when using these types.

  • Converts IntOrString and ResourceQuantity from structs back to classes
  • Adds null-safe handling in YAML converters with conditional operators
  • Includes a comprehensive E2E test for V2 Horizontal Pod Autoscaler functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/KubernetesClient/Models/IntOrString.cs Reverted from struct to class and added null safety in implicit string conversion
src/KubernetesClient/Models/ResourceQuantity.cs Reverted from struct to class
src/KubernetesClient/Models/IntOrStringYamlConverter.cs Added null-conditional operator for safe YAML serialization
src/KubernetesClient/Models/ResourceQuantityYamlConverter.cs Added null-conditional operator for safe YAML serialization
tests/E2E.Tests/MinikubeTests.cs Added comprehensive E2E test for V2HorizontalPodAutoscaler operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, tg123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [brendandburns,tg123]

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

@k8s-ci-robot k8s-ci-robot merged commit 2922627 into kubernetes-client:master Oct 15, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ResourceQuantity is struct now and breaks API

3 participants