-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add namespace to referenced addressable before resolving destination #1254
Add namespace to referenced addressable before resolving destination #1254
Conversation
The resolver uses `ref.namespace` to lookup the destination addressable. `ref.namespace` for the `deadLetterSink` is not defaulted by the webhook like for `trigger.subscriber.ref`, so we might receive a destination with an empty string for `deadLetterSink.ref.namespace` which leads to not finding the referenced addressable service. Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
The following is the coverage report on the affected files.
|
Codecov Report
@@ Coverage Diff @@
## main #1254 +/- ##
============================================
+ Coverage 75.51% 75.70% +0.18%
Complexity 460 460
============================================
Files 87 87
Lines 3059 3058 -1
Branches 136 136
============================================
+ Hits 2310 2315 +5
+ Misses 582 579 -3
+ Partials 167 164 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@pierDipi |
The spec doesn't explicitly talk about this field being optional or the default value (I'll open an issue). The namespace for a That is also the logically expected behavior of our users as you can see in the linked issue. (#1011) I opened an issue in eventing to add this behavior knative/eventing#5747 (and a PR). Regarding this PR, I'd keep, regardless of the outcome of knative/eventing#5747, the logic of this PR to make sure we don't pass invalid data to the resolver that requires a namespace to be set. |
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.
/lgtm
/approve
Thanks @pierDipi for fixing this issue and also taking care of the same issue in other places
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, 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 |
|
/retest |
1 similar comment
/retest |
/cherry-pick release-0.25 |
1 similar comment
/cherry-pick release-0.25 |
/cherry-pick release-0.24 |
/cherry-pick release-0.23 |
@pierDipi: new pull request created: #1262 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: #1254 failed to apply on top of branch "release-0.24":
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: #1254 failed to apply on top of branch "release-0.23":
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 could not be created: failed to create pull request against knative-sandbox/eventing-kafka-broker#release-0.25 from head knative-prow-robot:cherry-pick-1254-to-release-0.25: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for knative-prow-robot:cherry-pick-1254-to-release-0.25."}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"} 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. |
The resolver uses
ref.namespace
to lookup the destinationaddressable.
ref.namespace
for thedeadLetterSink
is not defaulted by thewebhook like for
trigger.subscriber.ref
, so we might receive adestination with an empty string for
deadLetterSink.ref.namespace
which leads to not finding thereferenced addressable service.
Fixes #1011
Proposed Changes
Release Note