-
Notifications
You must be signed in to change notification settings - Fork 192
getGVR should only fail if no GroupVersionResource is found #4459
Conversation
a7635f4
to
ac3bc57
Compare
Codecov Report
@@ Coverage Diff @@
## main #4459 +/- ##
==========================================
- Coverage 49.66% 48.76% -0.91%
==========================================
Files 452 482 +30
Lines 45152 47229 +2077
==========================================
+ Hits 22425 23031 +606
- Misses 20596 22014 +1418
- Partials 2131 2184 +53
... and 39 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
243cbac
to
ac3bc57
Compare
ac3bc57
to
0cc0817
Compare
2e44d41
to
9a52c4c
Compare
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.
LGTM
/test install-vc7 |
/test install-vc7 |
/test install-vc7 |
9a52c4c
to
85afe58
Compare
/test install-vc7 |
/test install-vc7 |
The call to ServerPreferredResources could return an error even thoug the reource list is not empty. This should not be a failure if the reource list is not empty. This patch checks that if the error returned by ServerPreferredResoruces is "ErrorGroupDiscoveryFailed", the getGVR will only return a error (failure) if the resulting resource list is also empty.
85afe58
to
fc33b8f
Compare
/test install-vc7 |
install-vc7 test succeeded: https://gitlab.eng.vmware.com/TKG/bolt/bolt-release-yamls/-/merge_requests/4446 |
The call to ServerPreferredResources could return an error even thoug the reource list is not empty. This should not be a failure if the reource list is not empty. This patch checks that if the error returned by ServerPreferredResoruces is "ErrorGroupDiscoveryFailed", the getGVR will only return a error (failure) if the resulting resource list is also empty.
The call to ServerPreferredResources could return an err != nil even though the resource list is not empty.
getGVR should not report a failure if the resource list does contain a matching GroupVersionResource, even if ServerPreferredResources returned err != nil.
What this PR does / why we need it
This patch modifies getGVR so it only return a error (failure) if it cannot find a matching GroupVersionResource.
Which issue(s) this PR fixes
Fixes #4460
Describe testing done for PR
Unit test created and executed.
ran deployed to vsphere 7 platform.
Release note
Additional information
Special notes for your reviewer