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

Add producer interceptor PartitionKeyExtensionInterceptor #751

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Mar 22, 2021

As reported in slack, we don't set this interceptor.

Proposed Changes

  • Set PartitionKey interceptor to PartitionKeyExtensionInterceptor

Release Note

Add producer interceptor `io.cloudevents.kafka.PartitionKeyExtensionInterceptor` to provide ordered delivery based on the partitioning extension of the CloudEvents spec.

/kind bug

@pierDipi pierDipi requested review from a team as code owners March 22, 2021 19:36
@knative-prow-robot knative-prow-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. labels Mar 22, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 22, 2021
@knative-prow-robot knative-prow-robot added area/data-plane size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 22, 2021
@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #751 (837a958) into main (a2ee460) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #751      +/-   ##
============================================
- Coverage     76.63%   76.57%   -0.06%     
- Complexity      439      440       +1     
============================================
  Files            77       77              
  Lines          2910     2924      +14     
  Branches        133      133              
============================================
+ Hits           2230     2239       +9     
- Misses          530      534       +4     
- Partials        150      151       +1     
Flag Coverage Δ Complexity Δ
java-unittests 80.26% <0.00%> (-0.05%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...knative/eventing/kafka/broker/dispatcher/Main.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...r/dispatcher/http/HttpConsumerVerticleFactory.java 85.10% <ø> (-0.16%) 24.00 <0.00> (ø)
...v/knative/eventing/kafka/broker/receiver/Main.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...dispatcher/consumer/impl/OrderedOffsetManager.java 79.31% <0.00%> (-6.90%) 9.00% <0.00%> (-1.00%)
control-plane/pkg/reconciler/trigger/trigger.go 71.42% <0.00%> (-0.23%) 0.00% <0.00%> (ø%)
...spatcher/consumer/impl/UnorderedOffsetManager.java 100.00% <0.00%> (+2.40%) 13.00% <0.00%> (+1.00%)
...dispatcher/consumer/impl/BaseConsumerVerticle.java 93.33% <0.00%> (+3.33%) 9.00% <0.00%> (+1.00%)

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 a2ee460...837a958. Read the comment docs.

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we don't touch partitionKey anywhere else in the code? I'm pretty sure I saw some code about it recently, i'll give a look tomorrow

@@ -40,7 +40,7 @@ data:
receive.buffer.bytes=-1
request.timeout.ms=30000
enable.idempotence=false
# interceptor.classes=""
interceptor.classes="io.cloudevents.kafka.PartitionKeyExtensionInterceptor"
Copy link
Contributor

@slinkydeveloper slinkydeveloper Mar 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to hardcode this since we always want this behaviour? Or at least make users aware that changing this will break partition key extension?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@pierDipi pierDipi force-pushed the set-partitionkey-interceptor branch from 2b0b108 to 50366b8 Compare March 22, 2021 21:51
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 22, 2021
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@pierDipi pierDipi changed the title [WIP] Add producer interceptor PartitionKeyExtensionInterceptor Add producer interceptor PartitionKeyExtensionInterceptor Mar 22, 2021
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 22, 2021
@pierDipi pierDipi force-pushed the set-partitionkey-interceptor branch from 50366b8 to 837a958 Compare March 22, 2021 21:57
@pierDipi
Copy link
Member Author

Strimzi image (quay?)

/retest

@pierDipi
Copy link
Member Author

pierDipi commented Mar 22, 2021

https://status.quay.io/

Image pulls from quay.io are currently failing with the code "502 Bad Gateway". Engineers are currently investigating.

I'd stop retesting :)

@pierDipi
Copy link
Member Author

/retest

@pierDipi
Copy link
Member Author

Are you sure we don't touch partitionKey anywhere else in the code? I'm pretty sure I saw some code about it recently, i'll give a look tomorrow

Fixed

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slinkydeveloper

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2021
@slinkydeveloper
Copy link
Contributor

/cherry-pick release-0.21

@knative-prow-robot
Copy link
Contributor

@slinkydeveloper: once the present PR merges, I will cherry-pick it on top of release-0.21 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.21

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.

@slinkydeveloper
Copy link
Contributor

/retest

@knative-prow-robot
Copy link
Contributor

@slinkydeveloper: new pull request created: #754

In response to this:

/cherry-pick release-0.21

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 pierDipi deleted the set-partitionkey-interceptor branch April 14, 2021 21:14
pierDipi added a commit to pierDipi/eventing-kafka-broker that referenced this pull request Aug 30, 2023
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/data-plane cla: yes Indicates the PR's author has signed the CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants