Use apis.HTTP()#3830
Conversation
|
Welcome @skonto! It looks like this is your first PR to knative/eventing 🎉 |
|
Hi @skonto. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
c5d0352 to
1738cf4
Compare
|
/ok-to-test |
/test pull-knative-eventing-integration-tests |
|
The following jobs failed:
Failed non-flaky tests preventing automatic retry of pull-knative-eventing-integration-tests: and 6 more. |
pierDipi
left a comment
There was a problem hiding this comment.
I think there are some changes in the meaning of some replacements, for example here https://github.com/knative/eventing/pull/3830/files#diff-ab0df0c2544da80554e8826de8aa0d11R404
|
@pierDipi correct will fix. |
|
unit tests pass locally but the CI reports: |
|
/retest |
|
@pierDipi fixed cases where a raw uri needs to be parsed, LMKWYT. |
|
/assign |
| sink, _ := apis.ParseURL("uri://example") | ||
| sink := apis.HTTP("example") | ||
| sink.Scheme = "uri" |
There was a problem hiding this comment.
We set the scheme to http and then reset it to uri.
I think it's better to leave as it was before because the scheme isn't HTTP.
There was a problem hiding this comment.
Initially I thought from the description that we should use HTTP() everywhere but it is not the case. I will update it.
| sink, _ := apis.ParseURL("uri://example") | ||
| sink := apis.HTTP("example") | ||
| sink.Scheme = "uri" |
| // Set path | ||
| sinkTargetURI.Path = sinkURIReference |
There was a problem hiding this comment.
I found complicated figuring out the full URL because it's not set in one place.
What if we use something like:
sinkTargetURI = func() apis.URL {
u := apis.HTTP(sinkDNS)
u.Path = sinkURIReference
return u
}()or
sinkTargetURI = targetURL(sinkDNS, sinkURIReference)
// ...
func targetURL(host, path string) apis.URL {
u := apis.HTTP(host)
u.Path = path
return u
}| exampleUri, _ := apis.ParseURL("uri://example") | ||
| exampleUri := apis.HTTP("example") | ||
| exampleUri.Scheme = "uri" |
|
@pierDipi I updated the PR (also there were a couple of more places where I was setting the scheme in a different statement). |
|
neat! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lionelvillard, pierDipi, skonto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #3623
Proposed Changes
Left untouched: