From 59b9ee972cd7edc0ca44b6d07a5e1eedd61f5ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Thu, 17 Jul 2025 19:50:56 +0200 Subject: [PATCH 1/3] MaterializedViewMetadataTestSimple: Explicitly set compaction strategy "test_materialized_view_metadata_alter" checks which strategy is used on a view. The test did not set the strategy explicitly, instead relying on defaults. This default has changed in Scylla, causing the test to fail. --- tests/integration/standard/test_metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/standard/test_metadata.py b/tests/integration/standard/test_metadata.py index 8d677030f9..6238e2d98c 100644 --- a/tests/integration/standard/test_metadata.py +++ b/tests/integration/standard/test_metadata.py @@ -2126,7 +2126,8 @@ def setUp(self): self.session.execute("CREATE TABLE {0}.{1} (pk int PRIMARY KEY, c int)".format(self.keyspace_name, self.function_table_name)) self.session.execute( "CREATE MATERIALIZED VIEW {0}.mv1 AS SELECT pk, c FROM {0}.{1} " - "WHERE pk IS NOT NULL AND c IS NOT NULL PRIMARY KEY (pk, c)".format( + "WHERE pk IS NOT NULL AND c IS NOT NULL PRIMARY KEY (pk, c) " + "WITH compaction = {{ 'class' : 'SizeTieredCompactionStrategy' }}".format( self.keyspace_name, self.function_table_name) ) From 0c8202f26274285ff46777d42d1b033d2fd08c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Thu, 17 Jul 2025 19:51:48 +0200 Subject: [PATCH 2/3] xfail compact storage tests Scylla 2025.1 deprecated compact storage, and disabled in by default, which caused tests to fail. We should start expecting them to fail on version 2025.1 and later. --- tests/integration/__init__.py | 11 +++++++++-- tests/integration/standard/test_metadata.py | 7 ++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 770b000fca..96aa8fdbee 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -14,6 +14,7 @@ import re import os +from typing import Callable from cassandra.cluster import Cluster from tests import connection_class, EVENT_LOOP_MANAGER @@ -258,6 +259,13 @@ def _id_and_mark(f): return _id_and_mark +def xfail_scylla_version(filter: Callable[[Version], bool], reason: str, *args, **kwargs): + if SCYLLA_VERSION is None: + return pytest.mark.skipif(False, reason="It is just a NoOP Decor, should not skip anything") + current_version = Version(get_scylla_version(SCYLLA_VERSION)) + + return pytest.mark.xfail(filter(current_version), reason=reason, *args, **kwargs) + local = local_decorator_creator() notprotocolv1 = unittest.skipUnless(PROTOCOL_VERSION > 1, 'Protocol v1 not supported') greaterthanprotocolv3 = unittest.skipUnless(PROTOCOL_VERSION >= 4, 'Protocol versions less than 4 are not supported') @@ -297,7 +305,7 @@ def _id_and_mark(f): requiresmallclockgranularity = unittest.skipIf("Windows" in platform.system() or "asyncore" in EVENT_LOOP_MANAGER, "This test is not suitible for environments with large clock granularity") requiressimulacron = unittest.skipIf(SIMULACRON_JAR is None or CASSANDRA_VERSION < Version("2.1"), "Simulacron jar hasn't been specified or C* version is 2.0") - +requirescompactstorage = xfail_scylla_version(lambda v: v >= Version('2025.1.0'), reason="ScyllaDB deprecated compact storage", raises=InvalidRequest) libevtest = unittest.skipUnless(EVENT_LOOP_MANAGER=="libev", "Test timing designed for libev loop") def wait_for_node_socket(node, timeout): @@ -703,7 +711,6 @@ def xfail_scylla_version_lt(reason, oss_scylla_version, ent_scylla_version, *arg return pytest.mark.xfail(current_version < Version(oss_scylla_version), reason=reason, *args, **kwargs) - class UpDownWaiter(object): def __init__(self, host): diff --git a/tests/integration/standard/test_metadata.py b/tests/integration/standard/test_metadata.py index 6238e2d98c..73bc40878a 100644 --- a/tests/integration/standard/test_metadata.py +++ b/tests/integration/standard/test_metadata.py @@ -42,7 +42,8 @@ greaterthancass21, assert_startswith, greaterthanorequalcass40, lessthancass40, TestCluster, requires_java_udf, requires_composite_type, - requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt) + requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt, + requirescompactstorage) from tests.util import wait_until @@ -428,6 +429,7 @@ def test_composite_in_compound_primary_key_ordering(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_compact_storage(self): create_statement = self.make_create_statement(["a"], [], ["b"]) create_statement += " WITH COMPACT STORAGE" @@ -437,6 +439,7 @@ def test_compact_storage(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_dense_compact_storage(self): create_statement = self.make_create_statement(["a"], ["b"], ["c"]) create_statement += " WITH COMPACT STORAGE" @@ -456,6 +459,7 @@ def test_counter(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_counter_with_compact_storage(self): """ PYTHON-1100 """ create_statement = ( @@ -468,6 +472,7 @@ def test_counter_with_compact_storage(self): self.check_create_statement(tablemeta, create_statement) @lessthancass40 + @requirescompactstorage def test_counter_with_dense_compact_storage(self): create_statement = ( "CREATE TABLE {keyspace}.{table} (" From 6e1bce76e7c4caf0496428e8b3d2eaa1c1c33f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Thu, 17 Jul 2025 20:40:30 +0200 Subject: [PATCH 3/3] CI: Update Scylla to 2025.2 --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bccbdc63cc..b75ef57c42 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -68,6 +68,6 @@ jobs: - name: Test with pytest run: | export EVENT_LOOP_MANAGER=${{ matrix.event_loop_manager }} - export SCYLLA_VERSION='release:6.2' + export SCYLLA_VERSION='release:2025.2' export PROTOCOL_VERSION=4 uv run pytest tests/integration/standard/ tests/integration/cqlengine/