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

adds WithNamespace ability to contexts #2390

Closed
wants to merge 1 commit into from

Conversation

gab-satchi
Copy link

Changes

  • 🐛 Fixes issue where namespace can be misrepresented in the context. Depending on the client, namespace may not be present in the metadata. With these changes, we attach the namespace directly from the incoming request.

/kind bug

Fixes part of the issue raised in knative/eventing: #4514

Release Note


Docs


@knative-prow-robot knative-prow-robot added kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 12, 2022
@knative-prow-robot
Copy link
Contributor

Welcome @gab-satchi! It looks like this is your first PR to knative/pkg 🎉

@knative-prow-robot
Copy link
Contributor

Hi @gab-satchi. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 12, 2022
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gab-satchi
To complete the pull request process, please assign mattmoor after the PR has been reviewed.
You can assign the PR to them by writing /assign @mattmoor in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gab-satchi
Copy link
Author

I didn't modify one location where the parentMeta is still used: in knative_reference. I'm unsure where else this reference may be getting used and whether it should also be modified in this PR.

@dprotaso
Copy link
Member

Looking at the original issue - is this not a k8s bug? I'd expected namespaced resources hitting the webhook to have valid metadata

@dprotaso
Copy link
Member

dprotaso commented Jan 13, 2022

/hold

cc @shinigambit looks like there's an issue with the merge upstream step in the action for non-members of the org?

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 13, 2022
@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #2390 (c0eba4e) into main (3f86f59) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2390      +/-   ##
==========================================
+ Coverage   63.30%   63.32%   +0.02%     
==========================================
  Files         226      226              
  Lines        9786     9792       +6     
==========================================
+ Hits         6195     6201       +6     
  Misses       3311     3311              
  Partials      280      280              
Impacted Files Coverage Δ
apis/contexts.go 100.00% <100.00%> (ø)
webhook/resourcesemantics/defaulting/defaulting.go 79.75% <100.00%> (+0.12%) ⬆️
...n/cmd/injection-gen/generators/filtered_factory.go 0.00% <0.00%> (ø)
apis/duck/v1/source_types.go 45.28% <0.00%> (+1.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96f1852...c0eba4e. Read the comment docs.

@dprotaso
Copy link
Member

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 13, 2022
@pseudorandoom
Copy link
Contributor

I know it's not ideal but while I find the source of the problem I think a rebase against main could make the merge a fast forward and unblock this PR @gab-satchi @dprotaso

@gab-satchi
Copy link
Author

Looking at the original issue - is this not a k8s bug? I'd expected namespaced resources hitting the webhook to have valid metadata

Yeah I do think it's better solved in k8s. I'll investigate there

@github-actions
Copy link
Contributor

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 22, 2022
@github-actions github-actions bot closed this Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants