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

update requestScope to fully qualify kind and resource #17956

Merged
merged 1 commit into from
Dec 2, 2015

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Nov 30, 2015

Updates the RequestScope to have fully qualified kinds and resources.

ref #17216

@liggitt @caesarxuchao

@wojtek-t I think you were in this area recently.

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 30, 2015
@k8s-bot
Copy link

k8s-bot commented Nov 30, 2015

GCE e2e test build/test passed for commit 86cb9ffa2c4990524a4e8574be25570ab6b6a35c.

getSubpathKey string
getOptions runtime.Object
versionedGetOptions runtime.Object
getOptionsInternalFQKind unversioned.GroupVersionKind
Copy link
Member

Choose a reason for hiding this comment

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

What is FQ? Could we expand the acronym?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is FQ? Could we expand the acronym?

FullyQualified. It gets a bit long. @derekwaynecarr preferred not having GVK

@caesarxuchao
Copy link
Member

Several questions and nits, otherwise LGTM. Thanks.

@deads2k deads2k force-pushed the gv-requestscope branch 2 times, most recently from 2c6ecbe to b4ca233 Compare December 1, 2015 13:06
@deads2k
Copy link
Contributor Author

deads2k commented Dec 1, 2015

variable names changed, spelling corrected, and questioned answered.

@k8s-bot
Copy link

k8s-bot commented Dec 1, 2015

GCE e2e test build/test passed for commit b4ca23332ddf6f7282c631521854e5c14828cb48.

@k8s-bot
Copy link

k8s-bot commented Dec 1, 2015

GCE e2e test build/test passed for commit 2c6ecbe8e1dcd7f96db6f642e56671d523c18d84.

}

if err := scope.Codec.DecodeParametersInto(query, versioned); err != nil {
return nil, errors.NewBadRequest(err.Error())
}
out, err := scope.Convertor.ConvertToVersion(versioned, internalGVString)
out, err := scope.Convertor.ConvertToVersion(versioned, internalKind.GroupVersion().String())
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need the internalKind, why can't we do it the old way, using scope.InternalVersion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we need the internalKind, why can't we do it the old way, using scope.InternalVersion?

scope.InternalVersion is the internal version of the object you're returning. This method needs to have the internal version of your getOptions. The two are always different except for the legacy kube group.

@caesarxuchao
Copy link
Member

Thank you @deads2k. LGTM.

@caesarxuchao caesarxuchao added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 1, 2015
@k8s-github-robot
Copy link

Continuous integration appears to have missed, closing and re-opening to trigger it

@k8s-bot
Copy link

k8s-bot commented Dec 1, 2015

GCE e2e test build/test passed for commit a7dd09e.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Dec 2, 2015

GCE e2e test build/test passed for commit a7dd09e.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Dec 2, 2015
@k8s-github-robot k8s-github-robot merged commit ee71ddc into kubernetes:master Dec 2, 2015
@deads2k deads2k deleted the gv-requestscope branch February 26, 2016 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants