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

Issue with TPRs and ugorji? #190

Closed
ahmetb opened this issue May 12, 2017 · 2 comments
Closed

Issue with TPRs and ugorji? #190

ahmetb opened this issue May 12, 2017 · 2 comments

Comments

@ahmetb
Copy link
Member

ahmetb commented May 12, 2017

I came across this in examples/third-party-resources/types.go

// The code below is used only to work around a known problem with third-party
// resources and ugorji. If/when these issues are resolved, the code below
// should no longer be required.

Is this still valid (I see last update to this hunk was 6 months ago) What's the ugorji issue? (I assume this is https://github.com/ugorji/go/tree/master/codec package. I don't see any relevant open issues there).

@rossf7
Copy link

rossf7 commented May 16, 2017

I think this is still a problem at least in the release-2.0 branch. There was a lot of discussion in #8.

I came to #8 due to this problem with watching TPRs kubernetes/kubernetes#26003. I tried to apply the workaround in one of our TPRs with this change but still getting decode errors with our delete watches. e.g.

E0516 11:32:23.205099       1 streamwatcher.go:109] Unable to decode an event from the watch stream: json: cannot unmarshal string into Go value of type struct { Type watch.EventType; Object certificatetpr.CustomObject }
E0516 11:32:23.404765       1 streamwatcher.go:109] Unable to decode an event from the watch stream: invalid character 's' looking for beginning of value
E0516 11:32:23.604444       1 streamwatcher.go:109] Unable to decode an event from the watch stream: invalid character 's' looking for beginning of value

Adding a watch to the TPR example would be really helpful.

Update: I'd missed that master now has a controller example 👍

@nikhita
Copy link
Member

nikhita commented Jun 15, 2017

@ahmetb I think this issue can probably be closed now.

TPR is now deprecated and CustomResourceDefinition (CRD) is the successor. The examples for CRDs do not have the comment: https://github.com/kubernetes/apiextensions-apiserver/blob/master/examples/client-go/apis/cr/v1/types.go.

Also, the comment is no longer present in the deprecated-TPR example: https://github.com/kubernetes/client-go/blob/master/examples/third-party-resources-deprecated/apis/tpr/v1/types.go

@ahmetb ahmetb closed this as completed Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants