Skip to content

Commit

Permalink
KAFKA-15378: fix streams upgrade system test (#14539)
Browse files Browse the repository at this point in the history
Fixing bad test setup. We tried to fix an upgrade bug for FK-joins in 3.1 release, but it later turned out that the PR was not sufficient to fix it. We finally fixed in 3.4 release.

This PR updates the system test matrix to only test working versions with FK-joins, limited to available test versions.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Hao Li <hli@confluent.io>, Mickael Maison <mickael.maison@gmail.com>
  • Loading branch information
mjsax committed Oct 20, 2023
1 parent 9fca008 commit 680deff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
Expand Up @@ -100,7 +100,7 @@ def test_streams_runs_with_broker_down_initially(self, metadata_quorum):
processor_3 = StreamsBrokerDownResilienceService(self.test_context, self.kafka, configs)
processor_3.start()

broker_unavailable_message = "Broker may not be available"
broker_unavailable_message = "Node may not be available"

# verify streams instances unable to connect to broker, kept trying
self.wait_for_verification(processor, broker_unavailable_message, processor.LOG_FILE, 10)
Expand Down
14 changes: 8 additions & 6 deletions tests/kafkatest/tests/streams/streams_upgrade_test.py
Expand Up @@ -40,11 +40,13 @@
metadata_1_versions = [str(LATEST_0_10_0)]
metadata_2_versions = [str(LATEST_0_10_1), str(LATEST_0_10_2), str(LATEST_0_11_0), str(LATEST_1_0), str(LATEST_1_1),
str(LATEST_2_4), str(LATEST_2_5), str(LATEST_2_6), str(LATEST_2_7), str(LATEST_2_8),
str(LATEST_3_0)]
# upgrading from version (2.4...3.0) is broken and only fixed later in 3.1
# we cannot test two bounce rolling upgrade because we know it's broken
# instead we add version 2.4...3.0 to the `metadata_2_versions` upgrade list
fk_join_versions = [str(LATEST_3_1), str(LATEST_3_2), str(LATEST_3_3)]
str(LATEST_3_0), str(LATEST_3_1), str(LATEST_3_2), str(LATEST_3_3)]
# upgrading from version (2.4...3.3) is broken and only fixed later in 3.3.3 (unreleased) and 3.4.0
# -> https://issues.apache.org/jira/browse/KAFKA-14646
# thus, we cannot test two bounce rolling upgrade because we know it's broken
# instead we add version 2.4...3.3 to the `metadata_2_versions` upgrade list
#fk_join_versions = [str(LATEST_3_4)]


"""
After each release one should first check that the released version has been uploaded to
Expand Down Expand Up @@ -202,7 +204,7 @@ def test_upgrade_downgrade_brokers(self, from_version, to_version):
@cluster(num_nodes=6)
@matrix(from_version=metadata_1_versions, to_version=[str(DEV_VERSION)])
@matrix(from_version=metadata_2_versions, to_version=[str(DEV_VERSION)])
@matrix(from_version=fk_join_versions, to_version=[str(DEV_VERSION)])
#@matrix(from_version=fk_join_versions, to_version=[str(DEV_VERSION)])
def test_rolling_upgrade_with_2_bounces(self, from_version, to_version):
"""
This test verifies that the cluster successfully upgrades despite changes in the metadata and FK
Expand Down
6 changes: 4 additions & 2 deletions tests/kafkatest/version.py
Expand Up @@ -107,8 +107,10 @@ def supports_topic_ids_when_using_zk(self):
return self >= V_2_8_0

def supports_fk_joins(self):
# while we support FK joins since 2.4, rolling upgrade is broken in older versions and only fixed in 3.1
return hasattr(self, "version") and self >= V_3_1_2
# while we support FK joins since 2.4, rolling upgrade is broken in older versions
# it's only fixed in 3.3.3 (unreleased) and 3.4.0
# -> https://issues.apache.org/jira/browse/KAFKA-14646
return hasattr(self, "version") and self >= V_3_4_0

def get_version(node=None):
"""Return the version attached to the given node.
Expand Down

0 comments on commit 680deff

Please sign in to comment.