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

Refactor transformObject to implement Encoder interface #83898

Closed
wojtek-t opened this issue Oct 14, 2019 · 4 comments · Fixed by #119801
Closed

Refactor transformObject to implement Encoder interface #83898

wojtek-t opened this issue Oct 14, 2019 · 4 comments · Fixed by #119801
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@wojtek-t
Copy link
Member

Long-term, transformObject:

func transformObject(ctx context.Context, obj runtime.Object, opts interface{}, mediaType negotiation.MediaTypeOptions, scope *RequestScope, req *http.Request) (runtime.Object, error) {

should be refactored so that it implements Encoder interface (and it has nested encoder inside):

This would allow us to cache the results for difference media.Convert options, which currently is not supported:

// TODO: Long-term, transformObject should be changed so that it

@kubernetes/sig-api-machinery-misc @liggitt

@wojtek-t wojtek-t added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 14, 2019
@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Oct 14, 2019
@tedyu
Copy link
Contributor

tedyu commented Oct 14, 2019

To implement Encoder interface, the negotiation.MediaTypeOptions would be passed to the class where transformation code (Encode()) resides, right ?

@fedebongio
Copy link
Contributor

/assign @wojtek-t

@fedebongio
Copy link
Contributor

Let us know if you need help

@wojtek-t
Copy link
Member Author

I won't get to it any time soon TBH. So marking lifecycle frozen for now.

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants