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

Panic in fake client #168

Closed
jsafrane opened this issue Oct 4, 2018 · 8 comments
Closed

Panic in fake client #168

jsafrane opened this issue Oct 4, 2018 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@jsafrane
Copy link

jsafrane commented Oct 4, 2018

I tried to write unit tests using the fake client and List() panics reliably when accessing opts.Raw:

func (c *fakeClient) List(ctx context.Context, opts *client.ListOptions, list runtime.Object) error {
gvk := opts.Raw.TypeMeta.GroupVersionKind()
gvr, _ := meta.UnsafeGuessKindToResource(gvk)

Why opts.Raw must be filled (it's not necessary when using the real client) and why it's TypeMeta should have any value?

If I understand the code (and I probably don't), it expects opts.Raw.TypeMeta.GroupVersionKind() to be the kind of items in returned list, not the list itself (i.e. Pod instead of PodList). Such requirement looks very odd.

@DirectXMan12
Copy link
Contributor

/kind bug

I think this is just straight-up a bug. I seem to recall discussion a solution at some point, but can't recall what it was.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 25, 2018
@sverrirsig
Copy link

Is anybody looking into this bug? :)

@skeggi
Copy link

skeggi commented Nov 13, 2018

Any intent to fix?

@DirectXMan12
Copy link
Contributor

DirectXMan12 commented Nov 13, 2018

I don't think anyone's working on it right now. If you want to, please let me know. Like most bugs, we do intend to fix it eventually -- we're just all fairly busy :-)

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Nov 13, 2018
manno pushed a commit to cloudfoundry-incubator/quarks-operator that referenced this issue Dec 11, 2018
manno pushed a commit to cloudfoundry-incubator/quarks-operator that referenced this issue Dec 11, 2018
* `go get -u ...@version`
* `go mod tidy`
* update generated code via bin/gen-kube

This should help with

* kubernetes-sigs/controller-runtime#168
* kubernetes-sigs/controller-runtime#213
@hasbro17
Copy link
Contributor

hasbro17 commented Jan 2, 2019

@jsafrane Is this still an issue? I think this has been fixed with #213 in the v0.1.8 release.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 27, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 27, 2019
@DirectXMan12
Copy link
Contributor

closing as per above comment

manno pushed a commit to cloudfoundry-incubator/quarks-job that referenced this issue Nov 11, 2019
* `go get -u ...@version`
* `go mod tidy`
* update generated code via bin/gen-kube

This should help with

* kubernetes-sigs/controller-runtime#168
* kubernetes-sigs/controller-runtime#213
manno pushed a commit to cloudfoundry-incubator/quarks-secret that referenced this issue Jun 9, 2020
* `go get -u ...@version`
* `go mod tidy`
* update generated code via bin/gen-kube

This should help with

* kubernetes-sigs/controller-runtime#168
* kubernetes-sigs/controller-runtime#213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants