Commit Graph

802 Commits

Author SHA1 Message Date
Josep Prat 7e81cc5e68
MINOR: Bump trunk to 3.9.0-SNAPSHOT (#16150)
Signed-off-by: Josep Prat <josep.prat@aiven.io>

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-05-31 16:41:44 +02:00
Krishna Agarwal bb6a042e99
KAFKA-16827: Integrate kafka native-image with system tests (#16046)
This PR does following things

System tests should bring up Kafka broker in the native mode
System tests should run on Kafka broker in native mode
Extract out native build command so that it can be reused.
Allow system tests to run on Native Kafka broker using Docker mechanism

To run system tests by bringing up Kafka in native mode:
Pass kafka_mode as native in the ducktape globals:--globals '{\"kafka_mode\":\"native\"}'

Running system tests by bringing up kafka in native mode via docker mechanism
_DUCKTAPE_OPTIONS="--globals '{\"kafka_mode\":\"native\"}'" TC_PATHS="tests/kafkatest/tests/"  bash tests/docker/run_tests.sh

To only bring up ducker nodes to cater native kafka
bash tests/docker/ducker-ak up -m native

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-05-30 22:24:23 +05:30
Lucas Brutschy 1dcdccf736
MINOR: fix streams_broker_compatibility test (#16015)
The system test was broken in ccf4bd5
which failed to import the matrix symbol. The test was failing silently, not
discovering any tests.

Reviewers: Bruno Cadonna <cadonna@apache.org>
2024-05-21 16:07:49 +02:00
Justine Olshan 3e15ab98ec
KAFKA-16992: InvalidRequestException: ADD_PARTITIONS_TO_TXN with version 4 which is not enabled when upgrading from kafka (#15971)
We weren't enabling discoverBrokerVersions to check the supported versions in the AddPartitionsToTxnManager. This means that any verification request (or any AddPartitionsToTxnRequest version) from a newer broker would fail when sending to an older broker.

The bulk of this change is adding additional transactions system tests for old versions.
One test upgrades the cluster completely. This didn't catch the issue but could be useful.

The other test forces a new broker to send a verification request to an older one. Without the discoverBrokerVersions change, all tests between mixed brokers failed. (We introduced a new request version in 3.8 -- which is a separate version from the one that caused the bug for 3.5 -> 3.6) With the addition, the tests all passed.

I also manually ran a test for 3.5 -> 3.6 since the issue there was slightly different and was caused by the unstableLatestVersion flag being enabled. This change should fix this as well. 👍

Reviewers:  David Jacot <djacot@confluent.io>
2024-05-17 21:35:28 -07:00
Lianet Magrans a4952572dc
MINOR: Change sys test describe topic parsing to improve extensibility (#15941)
Minor change to how the describe topic output is parsed in system tests, to ensure that the output is preserved, even if only some fields are relevant to the test for now (which is what the test used to do before recent changes)

Initial problem: System tests were parsing the describe topic output in kafka.py assuming all fields would include a value. The describe API was recently changed, breaking this logic, because it included new fields for which there may not be values (ex. LastKnownElr).

Initial fix: The initial fix for this was to drop all fields from the output except for the ones currently used in the test, where in reality only the fields without values are the problematic ones.

Proposed improvement: A more extensible approach would be to drop only the fields that have no values and preserve the full output, which is what the test did before the initial fix mentioned above. This allows to easily extend the test to include more fields as needed, which could follow as the describe API and tests evolves (it will only require to add the fields to the returned value when needed, without having to change how the fields object is stripped).

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-05-15 11:09:44 +02:00
Lucas Brutschy 3b43edd7a1
MINOR: Remove dev_version parameter from streams tests (#15874)
In two tests, we are using the current snapshot version as a test parameter
`to_version`, but as the only option. We can hardcode it. This
simplifies testing downstream, since the test parameters do not change
with every version. In particular, some tests downstream are blacklisted
because they do not work with ARM. These lists need to be updated every
time `DEV_VERSION` is bumped.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-05-08 09:43:26 +02:00
Lianet Magrans 636e65aa6b
KAFKA-16465: Fix consumer sys test revocation validation (#15778)
This fixes a consumer system test that was failing for the new protocol. The failure was because the test was expecting the eager behaviour of partitions being revoked on every rebalance, and it was wrongfully applying it to the runs with the new protocol too.
This same situation was previously identified and fixed in other parts of the sys test with #15661.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-29 11:56:36 +02:00
Kirk True 21faf874c0
KAFKA-16565: IncrementalAssignmentConsumerEventHandler throws error when attempting to remove a partition that isn't assigned (#15737)
Checking that the TopicPartition is in assignment before attempting to remove it.

Also added some logging and refactoring.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Lianet Magrans <lianetmr@gmail.com>
2024-04-26 10:21:22 +02:00
Kirk True dcdf812880
KAFKA-16609: Update parse_describe_topic to support new topic describe output (#15799)
The format of the 'describe topic' output was changed as part of KAFKA-15585 which required an update in the parsing logic used by system tests.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-25 11:12:42 +02:00
Justine Olshan a7ceacdd35
KAFKA-16571: reassign_partitions_test.bounce_brokers should wait for messages to be sent to every partition (#15739)
Added the check before the reassignment occurs and we start bouncing brokers.

Reviewers: David Mao <dmao@confluent.io>, David Jacot <djacot@confluent.io>
2024-04-24 17:30:20 -07:00
vamossagar12 f22ad6645b
KAFKA-16272: Adding new coordinator related changes for connect_distributed.py (#15594)
Summary of the changes:

Parameterizes the tests to use new coordinator and pass in consumer group protocol. This would be applicable to sink connectors only.
Enhances the sink connector creation code in system tests to accept a new optional parameter for consumer group protocol to be used.
Sets the consumer group protocol via consumer.override. override config when the new group coordinator is enabled.
Note about testing: There are 288 tests that need to be run and running on my local takes a lot of time. I will try to post the test results once I have a full run.

Reviewers: Kirk True <ktrue@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>, Philip Nee <pnee@confluent.io>
2024-04-19 17:29:50 +02:00
Philip Nee b87cd66dab
KAFKA-16579: Revert Consumer Rolling Upgrade (#15753)
Consumer Rolling Upgrade is meant to test the protocol upgrade for the old protocol. Therefore, I am removing old changes.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-19 11:36:27 +02:00
Lianet Magrans 9ea0503e23
KAFKA-16566: Fix consumer static membership system test with new protocol (#15738)
Updating consumer system test that was failing with the new protocol, related to static membership behaviour. The behaviour regarding static consumers that join with conflicting group instance id is slightly different between the classic and new consumer protocol, so the expectations in the tests needed to be updated.

If static members join with same instance id:

Classic protocol: all members join the group with the same group instance id, and then the first one will eventually fail (receives a HB error with FencedInstanceIdException)

Consumer protocol: new member with an instance Id already in use is not able to join, and first member remains active (new member with same instance Id receives an UnreleasedInstanceIdException in the response to the HB to join the group)

This PR is keeping the single parametrized test that existed before, given that what's being tested and part of the test itself apply to all protocols. This is just updating the expectations that are different, based on the protocol parameter.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Kirk True <ktrue@confluent.io>
2024-04-19 11:34:05 +02:00
Philip Nee dc9fbe453c
KAFKA-16389: ConsumerEventHandler does not support incremental assignment changes causing failure in system test (#15661)
The current AssignmentValidationTest only tests EAGER assignment protocol and does not support incremental assignment like CooperativeStickyAssignor and consumer protocol. Therefore in the ConsumerEventHandler, I subclassed the existing handler overridden the assigned and revoke event handling methods, to permit incremental changes to the current assignments.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Kirk True <ktrue@confluent.io>
2024-04-10 18:52:05 +02:00
Gaurav Narula bdd85405e3
KAFKA-16293: Test log directory failure in Kraft (#15409)
Enables log directory failure system test for all Kraft modes in addition to ZK mode.

Reviewers: Luke Chen <showuon@gmail.com>, Igor Soarez <soarez@apple.com>, Proven Provenzano <pprovenzano@confluent.io>
2024-04-06 16:01:25 +08:00
Manikumar Reddy fd9c7d2932
MINOR: Add 3.6.2 to system tests (#15665)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-05 19:36:23 +05:30
Kirk True c7ef80bb6c
KAFKA-16439: Update replication_replica_failure_test.py to support KIP-848’s group protocol config (#15629)
Added a new optional group_protocol parameter to the test methods, then passed that down to the setup_consumer method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Reviewers: Walker Carlson <wcarlson@apache.org>
2024-04-03 12:13:26 -05:00
Kirk True 6bb9caced0
KAFKA-16440: Update security_test.py to support KIP-848’s group protocol config (#15628)
Added a new optional group_protocol parameter to the test methods, then passed that down to the setup_consumer method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Reviewers: Walker Carlson <wcarlson@apache.org>
2024-04-03 12:13:14 -05:00
Kirk True 6569a354e6
KAFKA-16438: Update consumer_test.py’s static tests to support KIP-848’s group protocol config (#15627)
Migrated the following tests for the new consumer:

- test_fencing_static_consumer
- test_static_consumer_bounce
- test_static_consumer_persisted_after_rejoin

Reviewers: Walker Carlson <wcarlson@apache.org>
2024-04-03 12:13:03 -05:00
Kirk True e95e91a062
KAFKA-16275: Update kraft_upgrade_test.py to support KIP-848’s group protocol config (#15626)
Added a new optional group_protocol parameter to the test methods, then passed that down to the methods involved.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Reviewers: Walker Carlson <wcarlson@apache.org>
2024-04-03 12:12:51 -05:00
Philip Nee ace2152d22
KAFKA-16272: Update connect_distributed_test.py to support KIP-848’s group protocol config (#15576)
Update connect_distributed_test.py to support KIP-848’s group protocol config. Not all tests are updated because only a subset of it is using the consumer directly.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Kirk True <ktrue@confluent.io>
2024-03-27 12:10:29 +01:00
Kirk True 159d25a7df
KAFKA-16276: Update transactions_test.py to support KIP-848’s group protocol config (#15567)
Added a new optional group_protocol parameter to the test methods, then passed that down to the methods involved.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-22 14:58:40 +01:00
Kirk True f66610095c
KAFKA-16274: Update replica_scale_test.py to support KIP-848’s group protocol config (#15577)
Added a new optional group_protocol parameter to the test methods, then passed that down to the methods involved.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-22 14:57:37 +01:00
Philip Nee fb03da0df4
KAFKA-16271: Upgrade consumer_rolling_upgrade_test.py (#15578)
Upgrading the test to use the consumer group protocol. The two tests are failing due to Mismatch Assignment

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-22 11:17:49 +01:00
Alyssa Huang 7e85d7d32e
MINOR: KRaft upgrade tests should only use latest stable mv (#15566)
This should help us avoid testing MVs before they are usable (stable).
We revert back from testing 3.8 in this case since 3.7 is the current stable version.

Reviewers: Proven Provenzano <pprovenzano@confluent.io>, Justine Olshan <jolshan@confluent.io>
2024-03-21 11:06:40 -07:00
Philip Nee c5804e7649
KAFKA-16273: Update consumer_bench_test.py to use consumer group protocol (#15548)
Adding this as part of the greater effort to modify the system tests to incorporate the use of consumer group protocol from KIP-848. Following is the test results and the tests using protocol = consumer are expected to fail:

================================================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.11.4
session_id:       2024-03-16--002
run time:         76 minutes 36.150 seconds
tests run:        28
passed:           25
flaky:            0
failed:           3
ignored:          0
================================================================================

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Kirk True <ktrue@confluent.io>
2024-03-21 16:23:51 +01:00
Kirk True 386347bbca
KAFKA-16270: Update snapshot_test.py to support KIP-848’s group protocol config (#15538)
Added a new optional `group_protocol` parameter to the test methods, then passed that down to the `setup_consumer` method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new `@matrix` block instead of adding the `group_protocol=["classic", "consumer"]` to the existing blocks 😢

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-15 14:21:41 +01:00
Kirk True 57557df3ed
KAFKA-16269: Update reassign_partitions_test.py to support KIP-848’s group protocol config (#15540)
Added a new optional `group_protocol` parameter to the test methods, then passed that down to the `setup_consumer` method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new `@matrix` block instead of adding the `group_protocol=["classic", "consumer"]` to the existing blocks 😢

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-15 14:20:46 +01:00
Kirk True 8359f947a7
KAFKA-16268: Update fetch_from_follower_test.py to support KIP-848’s group protocol config (#15539)
Added a new optional `group_protocol` parameter to the test methods, then passed that down to the `setup_consumer` method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new `@matrix` block instead of adding the `group_protocol=["classic", "consumer"]` to the existing blocks 😢

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-15 14:19:56 +01:00
Kirk True 7945d322f6
KAFKA-16267: Update consumer_group_command_test.py to support KIP-848’s group protocol config (#15537)
* KAFKA-16267: Update consumer_group_command_test.py to support KIP-848’s group protocol config

Added a new optional group_protocol parameter to the test methods, then passed that down to the setup_consumer method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Note: this requires #15330.

* Update consumer_group_command_test.py

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-15 14:19:01 +01:00
Kirk True af0ec247cc
KAFKA-16231: Update consumer_test.py to support KIP-848’s group protocol config (#15330)
Added a new optional group_protocol parameter to the test methods, then passed that down to the setup_consumer method.

Unfortunately, because the new consumer can only be used with the new coordinator, this required a new @matrix block instead of adding the group_protocol=["classic", "consumer"] to the existing blocks 😢

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-03-15 14:17:22 +01:00
Stanislav Kozlovski 652537f28e
MINOR: Add 3.7.0 to core and client's upgrade compatibility tests (#15452)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-03-07 22:20:54 +08:00
Matthias J. Sax ccf4bd5f46
MINOR: Add 3.7 to Kafka Streams system tests (#15443)
Reviewers: Bruno Cadonna <bruno@confluent.io>
2024-03-06 12:02:58 -08:00
Stanislav Kozlovski 3075a3f144
MINOR: Add 3.7.0 to system tests (#15436)
As per the release instructions, this patch bumps the versions in the associated files here as part of the 3.7 release
2024-02-27 09:58:48 +01:00
Ahmed Sobeh 6eea40882d
KAFKA-15349: ducker-ak should fail fast when gradlew systemTestLibs fails (#15391)
In this modification, if ./gradlew systemTestLibs fails, the script will output an error message and terminate execution using the die function. This ensures that the script fails fast and prompts the user to address the error before continuing.

Reviewers: Luke Chen <showuon@gmail.com>
2024-02-20 11:19:53 +08:00
Kirk True 7a07aefd86
KAFKA-16230: Update verifiable_consumer.py to support KIP-848’s group protocol config (#15328)
The Python VerifiableConsumer now passes in the --group-protocol and --group-remote-assignor command line arguments to VerifiableConsumer if the node is running 3.7.0+ and using the new consumer group.protocol.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>
2024-02-16 11:53:53 +01:00
Mickael Maison 0bf830fc9c
KAFKA-14576: Move ConsoleConsumer to tools (#15274)
Reviewers: Josep Prat <josep.prat@aiven.io>, Omnia Ibrahim <o.g.h.ibrahim@gmail.com>
2024-02-13 19:24:07 +01:00
Mickael Maison 092dc7fc46
KAFKA-16238: Fix ConnectRestApiTest system test (#15346)
Reviewers: Yash Mayya <yash.mayya@gmail.com>
2024-02-09 13:36:56 +01:00
Matthias J. Sax 93712eca15
KAFKA-15594: Add version 3.6 to Kafka Streams system tests (#15151)
Reviewers: Walker Carlson <wcarlson@confluent.io>
2024-01-26 14:59:24 -08:00
Mickael Maison 27122634ab
MINOR: Add 3.5.2 and 3.6.1 to system tests (#14932)
Reviewers: Matthias J. Sax <mjsax@apache.org>
2024-01-12 15:55:10 +01:00
David Jacot a8203f9c7a
KAFKA-14505; [4/N] Wire transaction verification (#15142)
This patch wires the transaction verification in the new group coordinator. It basically calls the verification path before scheduling the write operation. If the verification fails, the error is returned to the caller.

Note that the patch uses `appendForGroup`. I suppose that we will move away from using it when https://github.com/apache/kafka/pull/15087 is merged.

Reviewers: Justine Olshan <jolshan@confluent.io>
2024-01-11 04:58:57 -08:00
Matthias J. Sax 5ec9899d1a
MINOR: bump dev version for system tests to 3.8 (#15157)
Reviewers: Josep Prat <josep.prat@aiven.io>
2024-01-09 23:08:36 -08:00
Stanislav Kozlovski b352cc6b4e
MINOR: Bump trunk to 3.8.0-SNAPSHOT (#14993)
This patch bumps the next release version to 3.8.0-SNAPSHOT.

Following the Release Process, I created the 3.7 branch and am following the steps to bump these versions:

Modify the version in trunk to bump to the next one (eg. "0.10.1.0-SNAPSHOT") in the following files:

docs/js/templateData.js
gradle.properties
kafka-merge-pr.py
streams/quickstart/java/pom.xml
streams/quickstart/java/src/main/resources/archetype-resources/pom.xml
streams/quickstart/pom.xml
tests/kafkatest/__init__.py
2023-12-14 09:07:18 +01:00
Jeff Kim ba49006561
MINOR: disable test_transactions with new group coordinator
https://issues.apache.org/jira/browse/KAFKA-14505 is not done yet so we need to disable the system test. Added a comment in the jira to re-enable once it's implemented.

Reviewers: Justine Olshan <jolshan@confluent.io>
2023-12-01 08:47:12 -08:00
Ritika Reddy 150b0e8290
KAFKA-15578: Migrating other system tests to use the group coordinator (#14582)
This patch converts a few more system tests to using the new group coordinator. This is only applied to KRaft clusters.

Reviewers: David Jacot <djacot@confluent.io>
2023-11-22 01:52:30 -08:00
José Armando García Sancio 809694a9f6
MINOR; Fix cluster size for migration tests (#14726)
Use smaller cluster sizes instead of the default cluster size

Reviewers: David Arthur <mumrah@gmail.com>, Ismael Juma <ismael@juma.me.uk>
2023-11-09 15:47:15 -08:00
José Armando García Sancio 35317d8f7b
MINOR; Fix KRaft metadata version system tests (#14722)
The latest metadata version is now 3.7. Fix the KRaft upgrade
test to upgrade to that version instead of 3.6.

Change the vagrant setup and gradle dependencies to use 3.3.2 instead of 3.3.1.

Reviewers: David Arthur <mumrah@gmail.com>
2023-11-09 12:03:12 -08:00
David Arthur 37715862d7 KAFKA-15704: Set missing ZkMigrationReady field on ControllerRegistrationRequest
This field was missed by the initial KIP-919 PR(s). The result is that migrations can't begin since
the controllers will never become ready. This patch fixes that as well as pulls over some fixes
from the 3.6 branch.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2023-10-27 14:16:24 -07:00
Ritika Reddy 68a5072f54
KAFKA-15578: System Tests for running old protocol with new coordinator (#14524)
This patch adds configs to facilitate the testing with the new group coordinator (KIP-848) in kraft mode. Only one test files is converted at the moment. The others will follow.

Reviewers: Ian McDonald <imcdonald@confluent.io>, David Jacot <djacot@confluent.io>
2023-10-27 10:33:40 -07:00
Mickael Maison 8b9f6d17f2
KAFKA-15093: Add 3.5 Streams upgrade system tests (#14602)
Reviewers: Matthias J. Sax <mjsax@apache.org>
2023-10-23 13:26:50 +02:00