Skip to content

KAFKA-19202: Enable KIP-1071 in streams_smoke_test.py #19560

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

Merged
merged 8 commits into from
Apr 29, 2025

Conversation

lucasbru
Copy link
Member

@lucasbru lucasbru commented Apr 25, 2025

Enables KIP-1071 (group.protocol=streams) in the first streams system
test streams_smoke_test.py.

All tests using KIP-1071 cannot use KafkaTest anymore, since we need
to customize the broker configuration. The corresponding functionality
is added to BaseStreamsTest, which all streams tests will have to
extend from now on.

There are some left-overs from ZK in the tests that I copied from
'KafkaTest'. They need to be cleaned up, but this should be done in a
separate PR.

@github-actions github-actions bot added tests Test fixes (including flaky tests) small Small PRs labels Apr 25, 2025
@lucasbru lucasbru requested review from mjsax and bbejeck April 25, 2025 10:34
@lucasbru
Copy link
Member Author

PTAL @aliehsaeedii

@mjsax mjsax added streams KIP-1071 PRs related to KIP-1071 labels Apr 25, 2025
override_configs[config_property.GROUP_COORDINATOR_REBALANCE_PROTOCOLS] = 'classic,consumer,share'
elif self.use_streams_groups is True:
override_configs[config_property.UNSTABLE_API_VERSIONS_ENABLE] = str(True)
override_configs[config_property.GROUP_COORDINATOR_REBALANCE_PROTOCOLS] = 'classic,consumer,streams'
Copy link
Member

Choose a reason for hiding this comment

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

Would it be simpler to start with enabledProtocols = 'classic,consumer' and do

if self.use_streams_groups is True:
  enabledProtocols += ',streams`

and end with

override_configs[config_property.GROUP_COORDINATOR_REBALANCE_PROTOCOLS] = enabledProtocols

Similar for share group? To avoid all this complicated nesting?

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

self.num_brokers = num_brokers
self.topics = topics

self.zk = ZookeeperService(test_context, self.num_zk) if quorum.for_test(test_context) == quorum.zk else None
Copy link
Member

Choose a reason for hiding this comment

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

Why this? I thought ZK is gone?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm just preserving the code that is already there (in KafkaTest). the quorum parameter is still everywhere in the streams tests. I can push a clean-up PR, for this PR, I just preserved what's tehre.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, removed it. I suppose quorum=zk is not used, so no need to support it here.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. Might be a good idea to also go over other tests and clean this up, if it's still there?

I would only expect some upgrade/downgrade tests which use older broker versions to still use ZK parameter.

@lucasbru
Copy link
Member Author

@mjsax This is ready for re-review

@lucasbru lucasbru merged commit 5c63b45 into apache:trunk Apr 29, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KIP-1071 PRs related to KIP-1071 small Small PRs streams tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants