Skip to content

kafka: add server debug switch for franz-go and enable it in CI (#6567) - #6642

Closed
ti-chi-bot wants to merge 1 commit into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-6567-to-release-8.5
Closed

ti-chi-bot wants to merge 1 commit into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-6567-to-release-8.5

Conversation

@ti-chi-bot

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #6567

What problem does this PR solve?

Issue Number: close #6566

What is changed and how it works?

  • Add the temporary [debug] enable-kafka-franz-go server option, disabled by default. Explicit kafka-client URI settings take precedence.
  • Add a shared integration-test cdc_server.toml that enables franz-go. The launcher uses this file by default, and an explicit --config selects the case-specific file.
  • Enable franz-go explicitly in the existing Kafka authentication case configs.
  • Cover configuration decoding and cloning and client selection precedence with unit tests.
  • Remove the mistakenly committed root server.toml.

Check List

Tests

  • Unit test:
    • make unit_test_pkg PKG='./pkg/config ./pkg/sink/kafka' P=2 — 407 tests passed with race detection.
  • Manual test:
    • make cdc — passed.
    • Eight startup configuration smoke checks with a stub CDC binary and TOML decoding — passed, covering the shared default file, explicit configs, redaction, legacy safepoint settings, and both authentication case configs.
    • bash -n tests/integration_tests/_utils/run_cdc_server tests/integration_tests/cli_with_auth/run.sh tests/integration_tests/cli_tls_with_auth/run.sh — passed.
    • tools/bin/shfmt -d tests/integration_tests/_utils/run_cdc_server tests/integration_tests/cli_with_auth/run.sh tests/integration_tests/cli_tls_with_auth/run.sh — passed.
    • git diff --check — passed.

Kafka integration tests were not run locally because required cluster binaries were unavailable.

Questions

Will it cause performance regression or break compatibility?

Client selection happens when sink options are constructed. The server default remains Sarama, and explicit URI selections retain their behavior. Kafka integration tests opt in to franz-go through their server configuration.

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

No. This is a temporary debug option for the franz-go migration.

Release note

None

Summary by CodeRabbit

  • New Features
    • Added a server setting to select franz-go as the default Kafka client.
    • Explicit Kafka client choices continue to take precedence over the server setting.
  • Bug Fixes
    • Integration tests now use their bundled server configuration by default.
    • Kafka/Glue schema registry tests now report Kafka unavailability with the appropriate error response.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added affects-26.9 This bug affects the TiDB X 26.9.x versions. component/kafka TiCDC kafka sink component/test Unit tests and integration tests component. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. type/enhancement The issue or PR belongs to an enhancement. labels Oct 20, 2026
@ti-chi-bot

ti-chi-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be LGTMed and approved by the reviewers firstly.
  2. For pull requests to TiDB-x branches, it must have no failed tests.
  3. AFTER it has lgtm and approved labels, please wait for the cherry-pick merging approval from triage owners.
Details

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-sigs/prow repository.

@ti-chi-bot

ti-chi-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lidezhu for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details 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

@ti-chi-bot

Copy link
Copy Markdown
Member Author

@3AceShowHand This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@ti-chi-bot

ti-chi-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.

Details

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 ti-community-infra/tichi repository.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53aad2fa-efbc-44a7-be89-488cc32d51ad
📥 Commits

Reviewing files that changed from the base of the PR and between a0de2a3 and 54b55ba.

📒 Files selected for processing: 10
  • pkg/config/debug.go
  • pkg/config/server_config_test.go
  • pkg/sink/kafka/options.go
  • pkg/sink/kafka/options_test.go
  • server.toml
  • tests/integration_tests/_utils/cdc_server.toml
  • tests/integration_tests/_utils/run_cdc_server
  • tests/integration_tests/cli_tls_with_auth/run.sh
  • tests/integration_tests/cli_with_auth/run.sh
  • tests/integration_tests/http_api/util/test_case.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

3AceShowHand added a commit to ti-chi-bot/ticdc-1 that referenced this pull request Oct 20, 2026
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
(cherry picked from commit 54b55ba)
@3AceShowHand

Copy link
Copy Markdown
Collaborator

closed by #6411

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects-26.9 This bug affects the TiDB X 26.9.x versions. component/kafka TiCDC kafka sink component/test Unit tests and integration tests component. do-not-merge/cherry-pick-not-approved do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. type/enhancement The issue or PR belongs to an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants