Skip to content

MINOR: Fix failed e2e compatibility_test_new_broker_test and upgrade_test.py#20471

Merged
omkreddy merged 1 commit into
apache:trunkfrom
JimmyWang6:KAFKA-19625-1
Sep 4, 2025
Merged

MINOR: Fix failed e2e compatibility_test_new_broker_test and upgrade_test.py#20471
omkreddy merged 1 commit into
apache:trunkfrom
JimmyWang6:KAFKA-19625-1

Conversation

@JimmyWang6

Copy link
Copy Markdown
Contributor

#20390 Replace the --producer.config for the verifiable producer and --consumer.config option by --command-config for the verifiable consumer. However, for e2e tests targeting older broker versions, the original configuration should still be used.

Fix the following tests: consumer_protocol_migration_test.pycompatibility_test_new_broker_test.py and upgrade_test.py.

My local test result before change:
image
After:
image

@github-actions github-actions Bot added tests Test fixes (including flaky tests) small Small PRs triage PRs from the community labels Sep 3, 2025
# For backward compatibility, we select the configuration based on node version:
# - For versions 4.2.0 and above, use --command-config
# - For older versions, continue using --producer.config
if node.version >= V_4_2_0:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please consider adding a helper method to KafkaVersion?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I have changed to use the new helper method.

@github-actions github-actions Bot removed the triage PRs from the community label Sep 4, 2025

@omkreddy omkreddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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


cmd += " --command-config %s" % VerifiableConsumer.CONFIG_FILE
version = get_version(node)
# According to KIP-1147, --consumer.config has been deprecated and will be removed in future versions.

@omkreddy omkreddy Sep 4, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we move these comments to version.supports_command_config() method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@omkreddy Thanks for your comments, sorry for my carelessness and I have addressed them.

@omkreddy omkreddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, assuming system tests pass.

@omkreddy
omkreddy merged commit 9257c43 into apache:trunk Sep 4, 2025
20 checks passed
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
…test.py (apache#20471)

apache#20390 Replace the -`-producer.config` for the verifiable producer and
`--consumer.config` option by `--command-config` for the verifiable
consumer. However, for e2e tests targeting older broker versions, the
original configuration should still be used.

Fix the following tests:
`consumer_protocol_migration_test.py`、`compatibility_test_new_broker_test.py`
and `upgrade_test.py`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved small Small PRs tests Test fixes (including flaky tests) tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants