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

⚠️ Use metadata-only client when retrieving CRDs #3625

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

vincepri
Copy link
Member

Signed-off-by: Vince Prignano vincepri@vmware.com

What this PR does / why we need it:

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 10, 2020
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 10, 2020
@vincepri vincepri force-pushed the metadata-only-crd branch 2 times, most recently from 205ae42 to 3bd5179 Compare September 10, 2020 19:18
@vincepri vincepri changed the title WIP: 🌱 Use metadata-only client when retrieving CRDs 🌱 Use metadata-only client when retrieving CRDs Sep 10, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 10, 2020
@vincepri
Copy link
Member Author

/milestone v0.3.10

@k8s-ci-robot k8s-ci-robot added this to the v0.3.10 milestone Sep 10, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 10, 2020
Signed-off-by: Vince Prignano <vincepri@vmware.com>
@ncdc
Copy link
Contributor

ncdc commented Sep 10, 2020

/lgtm
/assign @fabriziopandini @yastij

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 10, 2020
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Sep 10, 2020

@vincepri: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-apidiff 6dbac9d link /test pull-cluster-api-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@vincepri vincepri changed the title 🌱 Use metadata-only client when retrieving CRDs ⚠️ Use metadata-only client when retrieving CRDs Sep 10, 2020
@vincepri
Copy link
Member Author

Marking as ⚠️ for

  Incompatible changes:
  - ConvertReferenceAPIContract: changed from func(context.Context, sigs.k8s.io/controller-runtime/pkg/client.Client, *k8s.io/api/core/v1.ObjectReference) error to func(context.Context, github.com/go-logr/logr.Logger, sigs.k8s.io/controller-runtime/pkg/client.Client, *k8s.io/client-go/rest.Config, *k8s.io/api/core/v1.ObjectReference) error

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.

approve pending @yastij review

}

// Pick the latest version in the slice and validate it.
kubeVersions := util.KubeAwareAPIVersions(strings.Split(supportedVersions, "_"))
sort.Sort(kubeVersions)
chosen := kubeVersions[len(kubeVersions)-1]

// Validate that the picked version is actually in the CRD spec.
Copy link
Member

Choose a reason for hiding this comment

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

Working with metadata we are losing the validation that the picked version is an actual version, but I think this is an acceptable trade-off

Copy link
Member

@yastij yastij left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@ncdc
Copy link
Contributor

ncdc commented Sep 11, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc, yastij

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit 7f8fa2d into kubernetes-sigs:master Sep 11, 2020
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants