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

⚠ Expose Client runtime.Scheme #1058

Merged
merged 1 commit into from Aug 4, 2020

Conversation

vincepri
Copy link
Member

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 20, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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:

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 20, 2020
@vincepri
Copy link
Member Author

/test pull-controller-runtime-test-master

1 similar comment
@vincepri
Copy link
Member Author

/test pull-controller-runtime-test-master

@vincepri
Copy link
Member Author

/milestone v0.7.x

@k8s-ci-robot k8s-ci-robot added this to the v0.7.x milestone Jul 21, 2020
@alvaroaleman
Copy link
Member

/retest
/lgtm
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 30, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 30, 2020
@alvaroaleman
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2020
Signed-off-by: Vince Prignano <vincepri@vmware.com>
@alvaroaleman
Copy link
Member

@vincepri I am all in for the restmapper change, but lets please make it a distinct PR so it gets its own release note :)

@vincepri
Copy link
Member Author

vincepri commented Aug 4, 2020

I separated the commits because I knew you'd say that :P, wanted to get some eyes on it, given all the PRs all blocked for now

}

func (c *fakeClient) RESTMapper() meta.RESTMapper {
return nil
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a way to have a fake RESTMapper?

Copy link
Member

Choose a reason for hiding this comment

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

from a quick glance it seems there is no exported fake for this, only a private one: https://github.com/kubernetes/kubernetes/blob/0051d65f9f30db724dfb88256f70c23e37f6b257/staging/src/k8s.io/client-go/restmapper/shortcut_test.go#L197

At the end of the day we will need to hand-maintain a list of cluster-scoped objects to get this working for unit tests though. I think that should be okay though, because kube doesn't have that many cluster-scoped objects. We can also allow ppl to add additional types and their scope information so this can be used with cluster-scoped crds.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you be ok with having it nil for now and ask for some contributor to fill this in? I don't find the fake client particularly useful in many cases, but that's just me probably :D

Copy link
Member

Choose a reason for hiding this comment

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

yeah sgtm. Can you create an issue though, maybe with "good first issue" as its mostly:

  • Copy the other implementation
  • add a list of cluster-scoped objects
  • Return namespace-scoped by default and cluster-scoped if in list?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do! I'll split this commit in another PR first :)

@k8s-ci-robot
Copy link
Contributor

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

Test name Commit Details Rerun command
pull-controller-runtime-apidiff-master e263d2c link /test pull-controller-runtime-apidiff-master

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
Copy link
Member Author

vincepri commented Aug 4, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 4, 2020
@vincepri
Copy link
Member Author

vincepri commented Aug 4, 2020

@alvaroaleman Should be good to go / be merged

Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2020
@k8s-ci-robot k8s-ci-robot merged commit e83442f into kubernetes-sigs:master Aug 4, 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.

None yet

3 participants