Skip to content
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

🐛 util/GetGVKMetadata: fix get PartialObjectMetadata #5172

Merged

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer [email protected]

What this PR does / why we need it:

Before this change the request always failed with the following log:

I0827 16:39:27.378997       1 conversion.go:67] controller-runtime/manager/controller/machineset "msg"="Cannot retrieve CRD with metadata only client, falling back to slower listing" "MachineSet"="name" "cluster.x-k8s.io"="reconciler kind" "default"=null "my-cluster-default-worker-topology-mqqb5-947bf9665"="namespace" "err"="failed to retrieve metadata from GVK resource: Object 'Kind' is missing in 'unstructured object has no kind'"

I synced the implementation with what I did for release-0.3 here: https://github.com/kubernetes-sigs/cluster-api/pull/5013/files

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 27, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 27, 2021
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 27, 2021
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

We should probably add some tests for these functions 😄

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, vincepri

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 [fabriziopandini,vincepri]

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 b3a86a7 into kubernetes-sigs:master Aug 27, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Aug 27, 2021
@sbueringer
Copy link
Member Author

/approve
/lgtm

We should probably add some tests for these functions 😄

The nice thing about the fallback is that everything still works :)

@sbueringer sbueringer deleted the pr-fix-get-gvk-metadata branch August 27, 2021 17:36
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants