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

feat: channels use consumergroups #3816

Merged
merged 29 commits into from
Jun 3, 2024

Conversation

Cali0707
Copy link
Member

@Cali0707 Cali0707 commented Apr 4, 2024

Fixes #3047

As part of the KEDA Kafka component scaling, we need to move channels to use consumergroups internally. This makes that change.

Proposed Changes

  • Use the channelv2 reconciler implementation
  • Use statefulsets instead of deployments for the channel

Release Note

Channels now use consumergroups internally. IMPORTANT: to downgrade from this release, you will need to delete any consumergroups owned by a channel, and delete the kafka-channel-receiver and kafka-channel-dispatcher statefulsets

Docs

Signed-off-by: Calum Murray <cmurray@redhat.com>
@knative-prow knative-prow bot requested review from aliok and pierDipi April 4, 2024 20:09
@knative-prow knative-prow bot added area/control-plane area/data-plane size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 4, 2024
Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

Cali0707 commented Apr 4, 2024

@pierDipi I'm planning on removing the channel v1 implementation in a follow up PR, so that it's easier to see any changes I make in this PR (rather than having a complicated diff)

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 72.65918% with 73 lines in your changes are missing coverage. Please review.

Project coverage is 48.31%. Comparing base (483904b) to head (1c21e04).
Report is 1 commits behind head on main.

Current head 1c21e04 differs from pull request most recent head 29e5234

Please upload reports for the commit 29e5234 to get more accurate results.

Files Patch % Lines
control-plane/pkg/reconciler/channel/channel.go 73.47% 46 Missing and 15 partials ⚠️
...d/post-install/kafka_channel_deployment_deleter.go 0.00% 7 Missing ⚠️
control-plane/pkg/reconciler/channel/controller.go 88.00% 2 Missing and 1 partial ⚠️
control-plane/cmd/post-install/main.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3816      +/-   ##
==========================================
- Coverage   49.24%   48.31%   -0.94%     
==========================================
  Files         247      246       -1     
  Lines       14925    14528     -397     
==========================================
- Hits         7350     7019     -331     
+ Misses       6816     6800      -16     
+ Partials      759      709      -50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Cali0707
Copy link
Member Author

Cali0707 commented Apr 4, 2024

Looks like everything is broken 😅
/hold

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 4, 2024
Cali0707 added 11 commits April 4, 2024 16:50
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/cc @creydr @pierDipi

I made some changes around OIDC/TrustBundles for channelv2, where I am a lot less familiar with the code. Would you mind taking a look at the changes and seeing if they make sense?

@knative-prow knative-prow bot requested a review from creydr April 12, 2024 18:27
@Cali0707
Copy link
Member Author

/unhold

I think things should work now (the failing tests passed when I ran them locally, I think they are flaky in CI)

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2024
Signed-off-by: Calum Murray <cmurray@redhat.com>
@creydr
Copy link
Contributor

creydr commented Apr 16, 2024

/retest

@Cali0707
Copy link
Member Author

/test integration-tests

@Cali0707
Copy link
Member Author

/test reconciler-tests

@@ -33,7 +33,7 @@ import (
"knative.dev/eventing-kafka-broker/control-plane/pkg/config"
"knative.dev/eventing-kafka-broker/control-plane/pkg/kafka/clientpool"
"knative.dev/eventing-kafka-broker/control-plane/pkg/reconciler/broker"
"knative.dev/eventing-kafka-broker/control-plane/pkg/reconciler/channel"
channelv2 "knative.dev/eventing-kafka-broker/control-plane/pkg/reconciler/channel"
Copy link
Member

Choose a reason for hiding this comment

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

channelv2 -> channel

Copy link
Member Author

Choose a reason for hiding this comment

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

whoops, looks like I missed this in the refactor 🤦

Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/cc @pierDipi

Fixed the channelv2 name

@knative-prow knative-prow bot requested a review from pierDipi May 28, 2024 16:58
@pierDipi
Copy link
Member


    prober.go:78: There were 27029 events propagated, but 404 errors occurred. Listing them below.

/test upgrade-tests

@pierDipi
Copy link
Member

/test reconciler-tests-namespaced-broker

@pierDipi
Copy link
Member

Worked, retesting
/test upgrade-tests

@pierDipi
Copy link
Member

/test reconciler-tests-namespaced-broker

Copy link
Member

Choose a reason for hiding this comment

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

should the file be called kafka_channel_... ?

@pierDipi
Copy link
Member

/test upgrade-tests

Copy link
Member

Choose a reason for hiding this comment

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

How did you add / removed the tests here? did you move the channelv2_test.go here or did you make a one by one addition? I'm worried we're removing newly added tests

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the result of moving channelv2_test.go

Cali0707 and others added 2 commits May 30, 2024 13:29
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
…loyment_deleter

Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/cc @pierDipi

@knative-prow knative-prow bot requested a review from pierDipi May 30, 2024 17:32
@Cali0707
Copy link
Member Author

/test reconciler-tests-namespaced-broker

Cali0707 added 2 commits May 31, 2024 14:37
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2024
Copy link

knative-prow bot commented Jun 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Cali0707
Copy link
Member Author

Cali0707 commented Jun 3, 2024

/unhold

I'll follow up on unit tests in a separate PR

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 3, 2024
@knative-prow knative-prow bot merged commit 684d3e1 into knative-extensions:main Jun 3, 2024
34 of 35 checks passed
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/control-plane area/data-plane area/test lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-scaling Kafka Consumers for KafkaChannel's Subscriptions
4 participants