-
Notifications
You must be signed in to change notification settings - Fork 278
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
Fix panic when datacenter obj is not found #8494
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8494 +/- ##
=======================================
Coverage 73.49% 73.50%
=======================================
Files 578 578
Lines 36504 36514 +10
=======================================
+ Hits 26829 26840 +11
+ Misses 7956 7954 -2
- Partials 1719 1720 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Rahul Ganesh <rahulgab@amazon.com>
6d04bd5
to
c07f0f5
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rahulbabu95 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 |
/cherrypick release-0.20 |
/cherrypick release-0.19 |
@rahulbabu95: new pull request created: #8495 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@rahulbabu95: new pull request created: #8496 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of changes:
When the config parser is unable to find a object such as Datacenter/MachineConfig due to a typo in the DatacenterRef name (or if it was never passed in the spec), parser just doesn't set that object and doesn't do any validations around it. Accessing those objects later leads to a panic at runtime.
This change adds validations on the config, around the Datacenter obj if it's not found in the config to explicitly error out.
Fixes #7531
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.