tiflow icon indicating copy to clipboard operation
tiflow copied to clipboard

ticdc: support detecting the Kafka cluster version automatically

Open wk989898 opened this issue 11 months ago • 7 comments

What problem does this PR solve?

Issue Number: close #10852

What is changed and how it works?

Add Kafka version detect. Connect a broker and use ApiVersionsRequest to get ApiKeys and MaxVersion, according to MaxVersion infer the Kafka version.

Test:

ticdc instance: v8.0.0-master-dirty pd instance:v7.6.0 tikv instance:v7.6.0 tidb instance:v7.6.0

kafka version status
3.7.0 success
3.0.1 success
2.8.0 success
2.7.0 success
2.5.0 success
2.4.0 success
2.3.1 success
2.1.1 success
2.1.0 success
2.0.1 success
2.0.0 success
1.0.1 success
0.11.0 success
0.10.1 API is not supported
0.10.0 API is not supported
0.8.2 not support ApiVersionsRequest

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?

not sure.

Do you need to update user documentation, design documentation or monitoring documentation?

no.

Release note

`None`

wk989898 avatar Mar 27 '24 08:03 wk989898

Hi @wk989898. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

ti-chi-bot[bot] avatar Mar 27 '24 08:03 ti-chi-bot[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, CharlesCheung96

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:
  • ~~OWNERS~~ [3AceShowHand,CharlesCheung96]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Apr 08 '24 10:04 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-04-01 05:27:51.601357024 +0000 UTC m=+248933.128897563: :ballot_box_with_check: agreed by CharlesCheung96.
  • 2024-04-08 10:24:09.791888507 +0000 UTC m=+871511.319429053: :ballot_box_with_check: agreed by 3AceShowHand.

ti-chi-bot[bot] avatar Apr 08 '24 10:04 ti-chi-bot[bot]

Codecov Report

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

Project coverage is 57.4052%. Comparing base (894b36f) to head (4c10b56).

Additional details and impacted files
Components Coverage Δ
cdc 61.6809% <51.9480%> (+0.0162%) :arrow_up:
dm 51.2315% <ø> (-0.0061%) :arrow_down:
engine 63.3950% <ø> (+0.0070%) :arrow_up:
Flag Coverage Δ
unit 57.4052% <51.9480%> (+0.0086%) :arrow_up:

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

@@               Coverage Diff                @@
##             master     #10854        +/-   ##
================================================
+ Coverage   57.3966%   57.4052%   +0.0086%     
================================================
  Files           851        851                
  Lines        125469     125539        +70     
================================================
+ Hits          72015      72066        +51     
- Misses        48034      48056        +22     
+ Partials       5420       5417         -3     

codecov[bot] avatar Apr 22 '24 16:04 codecov[bot]

/retest

wk989898 avatar Apr 28 '24 06:04 wk989898

@wk989898: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

ti-chi-bot[bot] avatar Apr 28 '24 06:04 ti-chi-bot[bot]

/retest

CharlesCheung96 avatar May 07 '24 07:05 CharlesCheung96

In response to a cherrypick label: new pull request created to branch release-8.1: #11120.

ti-chi-bot avatar May 16 '24 08:05 ti-chi-bot

In response to a cherrypick label: new pull request created to branch release-7.5: #11123.

ti-chi-bot avatar May 16 '24 10:05 ti-chi-bot