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

fix the namespaceScoped of cachers #19970

Merged
merged 1 commit into from
Jan 30, 2016

Conversation

caesarxuchao
Copy link
Member

Fix #19939
It's strange that so many of them are misconfigured and haven't caused any problem so far.

@janetkuo

@caesarxuchao caesarxuchao added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Jan 22, 2016
@k8s-github-robot
Copy link

Labelling this PR as size/S

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 22, 2016
@lavalamp
Copy link
Member

It has caused a problem-- someone else has this same exact change out for review, but I can't find it now.

In that review, I asked for it to use e.g. "pods.NamespaceScoped()" instead of "true", so that future copy-paste inheritence will be more likely to change it. But I can't find the PR now...

@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. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 22, 2016
@caesarxuchao
Copy link
Member Author

@lavalamp, I've addressed your comment. PTAL. Thanks.

@k8s-bot
Copy link

k8s-bot commented Jan 22, 2016

GCE e2e test build/test passed for commit 587409d20bae136be00a7f093b94408ed8bfc835.

@k8s-bot
Copy link

k8s-bot commented Jan 22, 2016

GCE e2e test build/test passed for commit f76a7ca6e8f7e36aabd87699e2f2e80c56730edb.

@bprashanth
Copy link
Contributor

Thanks for doing this, was on call so didn't get a chance to address the review comments (#19663) but you can go ahead and get yours in.

@liggitt
Copy link
Member

liggitt commented Jan 22, 2016

any chance you could include a test that would have caught the error?

@smarterclayton
Copy link
Contributor

If you can add the test I'll add LGTM

@lavalamp
Copy link
Member

It's tricky to test this, since to be useful the test has to check resources that will be added in the future and that it therefore doesn't know about-- I suggested adding a check where REST objects are used that their storage & strategy scopes agree.

@caesarxuchao
Copy link
Member Author

I suggested adding a check where REST objects are used that their storage & strategy scopes agree.

@lavalamp, by actually doing this I found it perhaps is a bad idea. I pushed a second commit for the ease of discussion. See my comments in that commit for details.

@smarterclayton
Copy link
Contributor

Instead of passing in the boolean to storage decorator, why not pass in the create strategy itself? Then someone has to provide a valid strategy, and you can ensure you test that NamespaceScoped is true. That would satisfy the test aspect for me.

@smarterclayton
Copy link
Contributor

Or if not the create strategy, the NamespaceScoped() bool method as a sliced interface

@lavalamp
Copy link
Member

Or if not the create strategy, the NamespaceScoped() bool method as a sliced interface

Not sure what you mean by "sliced" but this sounds good to me.

@k8s-bot
Copy link

k8s-bot commented Jan 22, 2016

GCE e2e build/test failed for commit 46df6fb439843abc05516a267b2731077c1a1c20.

@smarterclayton
Copy link
Contributor

Sliced = a partial interface like:

type NamespaceScopeCheck interface {
  NamespaceScoped() bool
}

that create strategy satisfies

On Fri, Jan 22, 2016 at 5:05 PM, Kubernetes Bot notifications@github.com
wrote:

GCE e2e build/test failed for commit 46df6fb
46df6fb
.


Reply to this email directly or view it on GitHub
#19970 (comment)
.

@caesarxuchao
Copy link
Member Author

@smarterclayton yeah, I figured that out somehow. Could you take another look? Thanks.

@smarterclayton
Copy link
Contributor

I feel more comfortable with this (you would have to provide a fake method, knowing that you have the strategy handy). No further comments.

@k8s-bot
Copy link

k8s-bot commented Jan 23, 2016

GCE e2e test build/test passed for commit fb9ac049752479332effb49f2382382446f0b495.

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Jan 25, 2016

GCE e2e test build/test passed for commit ca3434d6350c497588eda19d10cc1eb729f92bb3.

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Jan 27, 2016

GCE e2e test build/test passed for commit ca3434d6350c497588eda19d10cc1eb729f92bb3.

@k8s-bot
Copy link

k8s-bot commented Jan 28, 2016

GCE e2e test build/test passed for commit ca3434d6350c497588eda19d10cc1eb729f92bb3.

@k8s-github-robot
Copy link

PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2016
@caesarxuchao caesarxuchao added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 29, 2016
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 29, 2016
@bprashanth
Copy link
Contributor

Apparently you need a rebase

@k8s-bot
Copy link

k8s-bot commented Jan 29, 2016

GCE e2e build/test failed for commit ebcff4b.

@bprashanth
Copy link
Contributor

@k8s-bot test this please #20306

@k8s-bot
Copy link

k8s-bot commented Jan 29, 2016

GCE e2e test build/test passed for commit ebcff4b.

@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 Jan 30, 2016

GCE e2e test build/test passed for commit ebcff4b.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Jan 30, 2016
@k8s-github-robot k8s-github-robot merged commit dc3ee66 into kubernetes:master Jan 30, 2016
@wojtek-t
Copy link
Member

wojtek-t commented Feb 3, 2016

@caesarxuchao - thanks a lot for fixing it!

openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request Jun 12, 2018
UPSTREAM: 65001: Quiet verbose apiserver logs

Origin-commit: b0ba202a287acf2ef6b77a9de8cfb3c6adaa369d
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. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. 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

10 participants