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

Objects don't have a description via kubectl explain #3054

Closed
sebgoa opened this issue Apr 27, 2020 · 15 comments
Closed

Objects don't have a description via kubectl explain #3054

sebgoa opened this issue Apr 27, 2020 · 15 comments
Assignees
Labels
area/api kind/bug Categorizes issue or PR as related to a bug. kind/good-first-issue Denotes an issue ready for a new contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@sebgoa
Copy link

sebgoa commented Apr 27, 2020

Describe the bug
No description when running kubectl explain

$ kubectl explain brokers
KIND:     Broker
VERSION:  eventing.knative.dev/v1beta1

DESCRIPTION:
     <empty>
$ kubectl explain sinkbinding
KIND:     SinkBinding
VERSION:  sources.knative.dev/v1alpha2

DESCRIPTION:
     <empty>

Expected behavior
I expected a description like all other k8s objects.

Maybe it comes from the kubectl code and we cannot get explain to work on CRDs.

@sebgoa sebgoa added the kind/bug Categorizes issue or PR as related to a bug. label Apr 27, 2020
@lionelvillard
Copy link
Member

related to #2609

@grantr grantr added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 27, 2020
@grantr
Copy link
Contributor

grantr commented Apr 27, 2020

Fixing #2609 (adding OpenAPI to CRDs) will fix this one.

@grantr grantr added this to the v0.15.0 milestone Apr 27, 2020
@grantr grantr modified the milestones: v0.15.0, v0.16.0 May 27, 2020
@grantr grantr modified the milestones: v0.16.0, v0.17.0 Jul 8, 2020
@vaikas
Copy link
Contributor

vaikas commented Jul 9, 2020

I started looking at this and thought about just fixing the "top level" description for the crd, and then I ran into this. Just jotting this down, not saying this is the problem, but...
kubernetes/kubernetes#82407

@grantr grantr added the kind/good-first-issue Denotes an issue ready for a new contributor. label Jul 20, 2020
@nlopezgi
Copy link
Contributor

/assign

I'm going to take a stab at helping with this one

@nlopezgi
Copy link
Contributor

@aavarghese will be taking care of Sequence and Parallel (as reported to me by @lionelvillard).
I'm working on Trigger, Sinkbinding (both almost ready to merge) and Subscription (tests are failing, I'm debugging).

Still up for grabs are: channel, containerresource, and eventtype.

I'll probably pick one of these 3 to continue work on Monday, if anyone else wants to help please ping here noting which resource you'll work on.

@aavarghese
Copy link
Contributor

aavarghese commented Aug 14, 2020

Running the generator (https://github.com/Harwayne/knative-gcp/tree/reflective-schema/hack/schema) for Sequence and Parallel is throwing a panic.

panic: can't handle kind runtime.Object

goroutine 1 [running]:
github.com/google/knative-gcp/hack/schema/pkg/schema.generateSchema(0x2101e80, 0x1e33480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	...
exit status 2

I'm currently working on APIServerSource. cc: @lionelvillard @nlopezgi

@nlopezgi
Copy link
Contributor

I had

Running the generator (https://github.com/Harwayne/knative-gcp/tree/reflective-schema/hack/schema) for Sequence and Parallel is throwing a panic.

panic: can't handle kind runtime.Object

goroutine 1 [running]:
github.com/google/knative-gcp/hack/schema/pkg/schema.generateSchema(0x2101e80, 0x1e33480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	...
exit status 2

I'm currently working on APIServerSource. cc: @lionelvillard @nlopezgi

iirc, I had the same error happen for channel. Lets get the easy ones out of the way and then deal later with whatever type this generator dislikes.
cc @Harwayne would you happen to know what this error means and which type it's related to?

@aavarghese
Copy link
Contributor

@nlopezgi I'm working on containersource next

@nlopezgi
Copy link
Contributor

@aavarghese thanks for letting me know. I'm working on eventtype next.

@nlopezgi
Copy link
Contributor

I think we only have left the ones for which the generator is problematic:

  • Parallel, sequence, channel
    I'll follow up with Adam to see if he has ideas and try to find the culprit type that causes the problem. Will report once I have more info.

@nlopezgi
Copy link
Contributor

with the current PRs in progress I think we should complete this issue? do you know if there are other resources that we should also be fixing similarly as part of this issue @lionelvillard ?

@aavarghese
Copy link
Contributor

@nlopezgi I'm curious, what was the issue with the generator that caused the failures for parallel, sequence, channel? How did we get past it?

@nlopezgi
Copy link
Contributor

nlopezgi commented Aug 24, 2020

@nlopezgi I'm curious, what was the issue with the generator that caused the failures for parallel, sequence, channel? How did we get past it?

It's an issue related to handling type Object that is transitively part of a ChannelTemplateSpec's Spec defined here:
https://github.com/knative/eventing/blob/master/vendor/k8s.io/apimachinery/pkg/runtime/types.go#L101
I "fixed" it by bypassing how the Interface type is handled in generate_schema here, returning a string instead of falling through and then manually completing the generated bits (with a preserve unknown fields statement).

@grantr grantr modified the milestones: v0.17.0, v0.18.0 Aug 25, 2020
@nlopezgi
Copy link
Contributor

/close
I think all the work here is done now. Please reopen if we're missing anything.

@knative-prow-robot
Copy link
Contributor

@nlopezgi: Closing this issue.

In response to this:

/close
I think all the work here is done now. Please reopen if we're missing anything.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/bug Categorizes issue or PR as related to a bug. kind/good-first-issue Denotes an issue ready for a new contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

7 participants