Skip to content

Update Scylla version in CI #509

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 3 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
11 changes: 9 additions & 2 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

The InvalidRequest exception class is used but not imported. This will cause a NameError at runtime when the decorator is applied.

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

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

This bot is dump, this exception is definitely imported:

from cassandra import OperationTimedOut, ReadTimeout, ReadFailure, WriteTimeout, WriteFailure, AlreadyExists,\
    InvalidRequest

libevtest = unittest.skipUnless(EVENT_LOOP_MANAGER=="libev", "Test timing designed for libev loop")

def wait_for_node_socket(node, timeout):
Expand Down Expand Up @@ -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):
Expand Down
10 changes: 8 additions & 2 deletions tests/integration/standard/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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 = (
Expand All @@ -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} ("
Expand Down Expand Up @@ -2126,7 +2131,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)
Comment on lines +2135 to 2136
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

The string formatting is incorrect. The .format() call has no placeholders to substitute, and the double braces will result in literal braces in the SQL. This should likely be a simple string concatenation or the .format() call should be removed.

Suggested change
"WITH compaction = {{ 'class' : 'SizeTieredCompactionStrategy' }}".format(
self.keyspace_name, self.function_table_name)
"WITH compaction = {{ 'class' : 'SizeTieredCompactionStrategy' }}"

Copilot uses AI. Check for mistakes.

Copy link
Author

@Lorak-mmk Lorak-mmk Jul 17, 2025

Choose a reason for hiding this comment

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

And again the bot is dumb. Double braces are a mean to escape the braces so they are put literally. There are 2 format args, and 2 placeholders - 0 and 1. I don't see a bug here.

)

Expand Down
Loading