-
Notifications
You must be signed in to change notification settings - Fork 593
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
Default dead letter sink namespace to the object namespace #5748
Default dead letter sink namespace to the object namespace #5748
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0a628c9
to
1b448d3
Compare
Codecov Report
@@ Coverage Diff @@
## main #5748 +/- ##
=======================================
Coverage 82.51% 82.52%
=======================================
Files 202 203 +1
Lines 6360 6374 +14
=======================================
+ Hits 5248 5260 +12
- Misses 767 768 +1
- Partials 345 346 +1
Continue to review full report at Codecov.
|
/hold waiting for @duglin to comment |
this breaks eventing-rabbitmq /cc @benmoss |
can't comment on the code change, but I'm ok with the concept! |
With upcoming changes to eventing DLQs will be defaulted to the namespace of their parent object if the namespace isn't specified in the ref. For some reason this causes a panic from the fake dynamic client that doesn't occur if the namespace isn't specified. It happens because ksvcs have been registered with the fake dynamic client as a type, but I'm not really sure why they only panic when a namespace is present. xref knative/eventing#5748 for the namespace defaulting change xref knative/eventing#5185 for more discussion of the changed behavior of client-go fake dynamic clients.
With upcoming changes to eventing DLQs will be defaulted to the namespace of their parent object if the namespace isn't specified in the ref. For some reason this causes a panic from the fake dynamic client that doesn't occur if the namespace isn't specified. It happens because ksvcs have been registered with the fake dynamic client as a type, but I'm not really sure why they only panic when a namespace is present. xref knative/eventing#5748 for the namespace defaulting change xref knative/eventing#5185 for more discussion of the changed behavior of client-go fake dynamic clients.
@pierDipi @lionelvillard downstream rabbit should be good now with knative-extensions/eventing-rabbitmq#433 |
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
1b448d3
to
7aed22b
Compare
Thanks! Let's see how this run goes! |
The following is the coverage report on the affected files.
|
Oh of course, we have the same test copy and pasted into two different packages, how silly of me to forget to replicate the changes 😄 |
@pierDipi try again 😄 |
Thanks Ben, it works! /unhold |
imc.Spec.SetDefaults(ctx) | ||
} | ||
|
||
func (imcs *InMemoryChannelSpec) SetDefaults(ctx context.Context) { | ||
// TODO: Nothing to default here... | ||
imcs.Delivery.SetDefaults(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pierDipi should we do that on other downstream channels too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original issue came up in here: knative-extensions/eventing-kafka-broker#1254
Not sure if it is done in other places too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll do it.
/lgtm |
/retest |
/cherry-pick release-0.26 |
/cherry-pick release-0.25 |
@pierDipi: new pull request created: #5904 In response to this:
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. |
@pierDipi: new pull request created: #5905 In response to this:
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. |
Dead letter sink namespace is not defaulted to the object namespace for:
Forcing every implementation to define the logic:
"If
spec.delivery.deadLetterSink.ref.namespace
is empty, usemetadata.namespace
"Fixes #5747 #5639
Proposed Changes
Pre-review Checklist
Release Note