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

Refactor integration and system tests to remove Zookeeper, add group protocol parameter #17581

Closed

Conversation

kirktrue
Copy link
Collaborator

@kirktrue kirktrue commented Oct 22, 2024

Removing "zk" from the list of quorum values to test in the integration and system tests. This does not remove all occurrences as not all tests support KRaft.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added core Kafka Broker tests Test fixes (including flaky tests) labels Oct 22, 2024
@kirktrue kirktrue added consumer kraft ctr Consumer Threading Refactor (KIP-848) clients ci-approved labels Oct 22, 2024
@@ -66,7 +66,7 @@ class ListOffsetsIntegrationTest extends KafkaServerTestHarness {
}

@ParameterizedTest
@ValueSource(strings = Array("zk", "kraft"))
@ValueSource(strings = Array("kraft"))
def testListMaxTimestampWithEmptyLog(quorum: String): Unit = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't the proper change here to remove the quorum parameter entirely?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd wondered that and wanted someone to raise the question.

I think it makes sense to remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Happy to oblige :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have a question out to @cmccabe regarding his preference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TestInfoUtils uses the parameters to determine if it isKraft(), isZkMigrationTest(), etc. Usages of those methods would need to be updated too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I'm sure, but wouldn't AK 4.0 have all of the ZK migration tests removed, and wouldn't all tests be ZK?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are some shenanigans done in the base test classes regarding the quorum param. Until we remove the ZK bits from that test infra, I think we actually need the quorum param :-/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I approve of the use of "shenanigans" to describe this 👍

@github-actions github-actions bot added the tools label Oct 29, 2024
@kirktrue
Copy link
Collaborator Author

@chia7712—do you have any advice for the best way to arrange these changes for review?

@kirktrue kirktrue changed the title [MIINOR] Refactor integration tests to remove Zookeeper, add group protocol parameter [MIINOR] Refactor integration and system tests to remove Zookeeper, add group protocol parameter Oct 29, 2024
@kirktrue kirktrue changed the title [MIINOR] Refactor integration and system tests to remove Zookeeper, add group protocol parameter Refactor integration and system tests to remove Zookeeper, add group protocol parameter Oct 30, 2024
@kirktrue
Copy link
Collaborator Author

@mumrah—can you take a look at approach in this PR and let me know if it's correct? Thanks!

Copy link
Contributor

@mumrah mumrah left a comment

Choose a reason for hiding this comment

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

@kirktrue the approach in the ducktape tests seems fine to me.

You might consider doing the system test changes in a separate PR since this one has grown quite large.

@@ -66,7 +66,7 @@ class ListOffsetsIntegrationTest extends KafkaServerTestHarness {
}

@ParameterizedTest
@ValueSource(strings = Array("zk", "kraft"))
@ValueSource(strings = Array("kraft"))
def testListMaxTimestampWithEmptyLog(quorum: String): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some shenanigans done in the base test classes regarding the quorum param. Until we remove the ZK bits from that test infra, I think we actually need the quorum param :-/

@kirktrue
Copy link
Collaborator Author

kirktrue commented Nov 1, 2024

@mumrah @cmccabe—is there an existing Jira that PR overlaps with the changes in this PR? I want to make sure I'm not duplicating efforts and/or stepping on anyone’s work.

Ideally there would be two PRs: one for the integration tests and one for the system tests, as @mumrah suggested above.

Thanks!

@kevin-wu24
Copy link
Contributor

@mumrah @cmccabe—is there an existing Jira that PR overlaps with the changes in this PR? I want to make sure I'm not duplicating efforts and/or stepping on anyone’s work.

Ideally there would be two PRs: one for the integration tests and one for the system tests, as @mumrah suggested above.

Thanks!

Your system test changes are a superset of the changes I made in https://github.com/apache/kafka/pull/17638/files (involves just removing explicit quorum.zk parameterizations), which is tracked by https://issues.apache.org/jira/browse/KAFKA-17625. When I tried making the metadata_quorum default value to use KRaft I ran into some issues getting the tests to work properly, so I created some separate JIRA issues for those tests (The Kafka Streams work is already being tracked here: https://issues.apache.org/jira/browse/KAFKA-17609):

My PR also removes zk from quorum.all_non_upgrade and quorum.all so those ZK test variations would be removed, but I don't see that in this PR's diff.

@kirktrue
Copy link
Collaborator Author

kirktrue commented Nov 2, 2024

Closing this PR in favor of #17669 and #17670.

@kirktrue kirktrue closed this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved clients consumer core Kafka Broker ctr Consumer Threading Refactor (KIP-848) kraft tests Test fixes (including flaky tests) tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants