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

Use namespace from context #42652

Merged
merged 1 commit into from
Mar 8, 2017
Merged

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Mar 7, 2017

Fixes #42653

Updates rbac_test.go to submit objects without namespaces set, which matches how actual objects are submitted to the API.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 7, 2017
@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 7, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@liggitt
Copy link
Member Author

liggitt commented Mar 7, 2017

cc @kubernetes/sig-auth-pr-reviews

@liggitt liggitt added kind/bug Categorizes issue or PR as related to a bug. sig/auth Categorizes an issue or PR as relevant to SIG Auth. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Mar 7, 2017
@liggitt liggitt added this to the v1.6 milestone Mar 7, 2017
@@ -47,12 +47,17 @@ func (s *Storage) Create(ctx genericapirequest.Context, obj runtime.Object) (run
return s.StandardStorage.Create(ctx, obj)
}

namespace, ok := genericapirequest.NamespaceFrom(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks weird when you're reading it. Explain why we pull the namespace out here.

Copy link
Member Author

Choose a reason for hiding this comment

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

so explained

@deads2k
Copy link
Contributor

deads2k commented Mar 7, 2017

lgtm, but I'd like an explanatory comment. Nearly everywhere else, the object is considered the source of truth, so this looks weird.

@liggitt
Copy link
Member Author

liggitt commented Mar 7, 2017

#42639 flake

@deads2k
Copy link
Contributor

deads2k commented Mar 7, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 7, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: deads2k, liggitt

Needs approval from an approver in each of these OWNERS Files:

We suggest the following people:
cc @smarterclayton
You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 7, 2017
@liggitt
Copy link
Member Author

liggitt commented Mar 8, 2017

#42646 #41889 flake

@k8s-bot gce etcd3 e2e test this
@k8s-bot gci gce e2e test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 55c436f into kubernetes:master Mar 8, 2017
@liggitt liggitt deleted the ctx-namespace branch March 11, 2017 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/auth Categorizes an issue or PR as relevant to SIG Auth. 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

6 participants