-
Notifications
You must be signed in to change notification settings - Fork 587
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
Refactor kncloudevents and add SendEvent
function
#7092
Conversation
aee859b
to
89a57d1
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #7092 +/- ##
==========================================
- Coverage 78.05% 77.89% -0.17%
==========================================
Files 250 249 -1
Lines 13390 13445 +55
==========================================
+ Hits 10452 10473 +21
- Misses 2405 2433 +28
- Partials 533 539 +6
☔ View full report in Codecov by Sentry. |
4223034
to
3429faf
Compare
/retest |
1 similar comment
/retest |
82a90ac
to
92ffb44
Compare
SendMessage
SendMessage
Hello @pierDipi, /assign @pierDipi |
SendMessage
SendEvent
function
/hold |
0932a21
to
1e1203f
Compare
pkg/channel/multichannelfanout/multi_channel_fanout_event_handler_test.go
Show resolved
Hide resolved
OK. cool. Let us know when this is no longer WIP, and ready for review |
FWIW: I ran the test now locally as well, and passes here too - after pulling the updated branch |
/test upgrade-tests |
/retest |
1 similar comment
/retest |
SendEvent
functionSendEvent
function
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
limitations under the License. | |||
*/ | |||
|
|||
package channel | |||
package kncloudevents_test |
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.
package _test
?
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.
yes, to prevent an import cycle. We are importing here pkg/eventingtls/eventingtlstesting
for the TLS tests, which is using pkg/kncloudevents
.
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.
meh - ok
// tracing | ||
"x-request-id", | ||
"x-request-id", // tracing | ||
"retry-after", |
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.
ah, nice - removing the other frm the filter
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, matzew 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 |
/test upgrade-tests |
Adds a function (`SendEvent`) to the kncloudevents package to Send events. This function: * configures the client (e.g. for TLS) * has option to send replies * has option to send to a DLS * has option to add additional transformers This allows e.g. for use cases like the following: ``` kncloudevents.SendEvent(ctx, event, sub.Subscriber, kncloudevents.WithHeader(additionalHeaders), kncloudevents.WithReply(sub.Reply), kncloudevents.WithDeadLetterSink(sub.DeadLetter), kncloudevents.WithRetryConfig(sub.RetryConfig)) ``` The `SendMessage` function is provided to make integration with existing packages easier (e.g. in dependent projects). Also migrated the usages of kncloudevents.NewCloudEventRequest() to the new SendEvent() function (mt-broker-filter and mt-broker-ingress): * 74c1552 * 9728713 * 958722d
* Remove deprecated httpclient msgsender (knative#7018) ## Proposed Changes Removed the legacy http client go, message sender go and respective test files, Since the functionality are handled in http client new and message sender new go Issue related : knative#6995 - 🗑️ Remove feature or internal logic - - - ### Pre-review Checklist - [x] **At least 80% unit test coverage** - [ ] **E2E tests** for any new behavior - [ ] **Docs PR** for any user-facing impact - [ ] **Spec PR** for any new API feature - [ ] **Conformance test** for any change to the spec **Release Note** ```release-note ``` **Docs** 📖 knative#6995 --------- Co-authored-by: Christoph Stäbler <[email protected]> * Refactor kncloudevents and add `SendEvent` function (knative#7092) Adds a function (`SendEvent`) to the kncloudevents package to Send events. This function: * configures the client (e.g. for TLS) * has option to send replies * has option to send to a DLS * has option to add additional transformers This allows e.g. for use cases like the following: ``` kncloudevents.SendEvent(ctx, event, sub.Subscriber, kncloudevents.WithHeader(additionalHeaders), kncloudevents.WithReply(sub.Reply), kncloudevents.WithDeadLetterSink(sub.DeadLetter), kncloudevents.WithRetryConfig(sub.RetryConfig)) ``` The `SendMessage` function is provided to make integration with existing packages easier (e.g. in dependent projects). Also migrated the usages of kncloudevents.NewCloudEventRequest() to the new SendEvent() function (mt-broker-filter and mt-broker-ingress): * 74c1552 * 9728713 * 958722d * Remove deprecated kncloudevents.CloudEventsRequest (knative#7146) * Remove kncloudevents.CloudEventsRequest * Run hack/update-codegen.sh * Add unit tests for generateBackoffFn() * Fix event dispatcher library data race (knative#7280) Fix dispatcher data race Signed-off-by: Pierangelo Di Pilato <[email protected]> --------- Signed-off-by: Pierangelo Di Pilato <[email protected]> Co-authored-by: Jeevan <[email protected]> Co-authored-by: Christoph Stäbler <[email protected]>
Adds a function (
SendEvent
) to the kncloudevents package to Send events. This function:This allows e.g. for use cases like the following:
The
SendMessage
function is provided to make integration with existing packages easier (e.g. in dependent projects).Also migrated the usages of kncloudevents.NewCloudEventRequest() to the new SendEvent() function (mt-broker-filter and mt-broker-ingress):