-
Notifications
You must be signed in to change notification settings - Fork 304
revert change to structs from classes for IntOrString and ResourceQuantity, and handle null values in YAML converters #1673
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
…and handle null values in YAML converters
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 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.
|
/lgtm |
|
[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:
Approvers can indicate their approval by writing |
this fix #1672