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

Allowing type object in kubectl swagger validation #24054

Merged
merged 1 commit into from
Apr 9, 2016

Conversation

nikhiljindal
Copy link
Contributor

Allowing "type": "object" in kubectl swagger validation.

We will cherrypick this in 1.2
This allows 1.2 kubectl to work with 1.3 api server which will use "type":"object" instead of "type":"any".
Ref #4700 (comment)

cc @bgrant0607

@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Apr 8, 2016
@bgrant0607 bgrant0607 assigned janetkuo and unassigned bgrant0607 Apr 8, 2016
@bgrant0607 bgrant0607 added this to the v1.2 milestone Apr 8, 2016
@bgrant0607 bgrant0607 added release-note Denotes a PR that will be considered when it comes time to generate release notes. cherrypick-candidate labels Apr 8, 2016
@bgrant0607
Copy link
Member

Yes, I would like this to be cherrypicked so that we can change to object in 1.3. Non-kubectl clients of the swagger spec are currently converting any to object manually.

@k8s-bot
Copy link

k8s-bot commented Apr 8, 2016

GCE e2e build/test passed for commit 75895fa3ffeeb0972b22f92f5bf1d0a734fef7f1.

@@ -118,7 +125,7 @@ func TestValid(t *testing.T) {
for _, test := range tests {
pod, err := readPod(test)
if err != nil {
t.Errorf("could not read file: %s", test)
t.Errorf("could not read file: %s, err: %v", test, err)
}
err = schema.ValidateBytes([]byte(pod))
Copy link
Member

Choose a reason for hiding this comment

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

remove the []byte()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

if err != nil {
t.Errorf("could not read file: %s, err: %v", test, err)
}
// Verify that pod has atleast one label (labels are type "any")
Copy link
Member

Choose a reason for hiding this comment

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

at least

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@janetkuo
Copy link
Member

janetkuo commented Apr 8, 2016

Only a few suggestions; feel free to LGTM after comments are addressed

@k8s-bot
Copy link

k8s-bot commented Apr 9, 2016

GCE e2e build/test passed for commit 3d27b7dcd54c14bec9ad695815a72fb8dac91b80.

@nikhiljindal
Copy link
Contributor Author

Thanks @janetkuo!
Updated the code as per comments.
Adding LGTM. Also adding the priority tag for faster merge.

@nikhiljindal nikhiljindal added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 9, 2016
@k8s-bot
Copy link

k8s-bot commented Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@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 Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@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 Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@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 Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@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 Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@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 Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@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 Apr 9, 2016

GCE e2e build/test passed for commit b476ee4.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 7ed19f7 into kubernetes:master Apr 9, 2016
@zmerlynn zmerlynn added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Apr 13, 2016
k8s-github-robot pushed a commit that referenced this pull request Apr 14, 2016
…#24054-upstream-release-1.2

Automatic merge from submit-queue

Automated cherry pick of #24054

Cherry pick of #24054 on release-1.2.
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.2" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this pull request Dec 1, 2016
…y-pick-of-#24054-upstream-release-1.2

Automatic merge from submit-queue

Automated cherry pick of kubernetes#24054

Cherry pick of kubernetes#24054 on release-1.2.
shouhong pushed a commit to shouhong/kubernetes that referenced this pull request Feb 14, 2017
…y-pick-of-#24054-upstream-release-1.2

Automatic merge from submit-queue

Automated cherry pick of kubernetes#24054

Cherry pick of kubernetes#24054 on release-1.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants