fix(action): crd resources can be empty#31578
Conversation
|
Done @benoittgt , thanks! |
TerryHowe
left a comment
There was a problem hiding this comment.
Since you added the error check, can you add a test for nil File?
|
@TerryHowe It is already there https://github.com/helm/helm/pull/31578/files#diff-b97a6f3723149f75e7945127b215944ea6a752bcf41a2e1c00b65ae0a409bc7cR1081 or do you refer to other nil File test case? |
Thanks! Sorry I missed that. |
|
Hi @manute first thank you for the PR. I pulled it down built it and ran the test and I got the following:
|
|
@robertsirc fixed! thanks |
Signed-off-by: Manuel Alonso <[email protected]>
Signed-off-by: Manuel Alonso <[email protected]>
Signed-off-by: Manuel Alonso <[email protected]>
Signed-off-by: Manuel Alonso <[email protected]>
|
@manute do you mind resolving the current conflicts? |
Signed-off-by: Manuel Alonso <[email protected]>
|
Broken tests. |
Signed-off-by: Manuel Alonso <[email protected]>
Signed-off-by: Manuel Alonso <[email protected]>
Signed-off-by: Manuel Alonso <[email protected]>
|
@TerryHowe fixed, thanks |
Signed-off-by: Manuel Alonso <[email protected]>
Signed-off-by: superShen0916 <[email protected]> Backport the fix from helm#31578 to dev-v3 branch. The installCRDs function previously could panic in several scenarios: - When a CRD object has a nil File field (accessing obj.File.Data) - When a CRD object has nil File.Data (passing nil to KubeClient.Build) - When KubeClient.Build returns an empty resource list (accessing res[0]) - When RESTClientGetter is nil (calling ToDiscoveryClient/ToRESTMapper) Added nil and empty checks to return descriptive errors instead of panicking in all these cases. Closes helm#31552 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: superShen0916 <[email protected]>
Signed-off-by: shenpeng.sp0916 <[email protected]> Backport the fix from helm#31578 to dev-v3 branch. The installCRDs function previously could panic in several scenarios: - When a CRD object has a nil File field (accessing obj.File.Data) - When a CRD object has nil File.Data (passing nil to KubeClient.Build) - When KubeClient.Build returns an empty resource list (accessing res[0]) - When RESTClientGetter is nil (calling ToDiscoveryClient/ToRESTMapper) Added nil and empty checks to return descriptive errors instead of panicking in all these cases. Closes helm#31552 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: shenpeng.sp0916 <[email protected]>
Signed-off-by: shenpeng.sp0916 <[email protected]> Backport the fix from helm#31578 to dev-v3 branch. The installCRDs function previously could panic in several scenarios: - When a CRD object has a nil File field (accessing obj.File.Data) - When a CRD object has nil File.Data (passing nil to KubeClient.Build) - When KubeClient.Build returns an empty resource list (accessing res[0]) - When RESTClientGetter is nil (calling ToDiscoveryClient/ToRESTMapper) Added nil and empty checks to return descriptive errors instead of panicking in all these cases. Closes helm#31552 Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: shenpeng.sp0916 <[email protected]>
What this PR does / why we need it:
It checks if the resources are empty to see if this issue #31552 is fixed
Special notes for your reviewer:
If applicable:
docs neededlabel should be applied if so)