Skip to content
Open
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
14 changes: 8 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ env:
WEAVIATE_135: 1.35.18
WEAVIATE_136: 1.36.12
WEAVIATE_137: 1.37.5-e0fe0d5.amd64
WEAVIATE_139: 1.39.0-rc.0-b41225e.amd64

jobs:
lint-and-format:
Expand Down Expand Up @@ -162,11 +163,11 @@ jobs:
fail-fast: false
matrix:
versions: [
{ py: "3.10", weaviate: $WEAVIATE_136, grpc: "1.59.0"},
{ py: "3.11", weaviate: $WEAVIATE_136, grpc: "1.66.0"},
{ py: "3.12", weaviate: $WEAVIATE_136, grpc: "1.70.0"},
{ py: "3.13", weaviate: $WEAVIATE_136, grpc: "1.72.1"},
{ py: "3.14", weaviate: $WEAVIATE_136, grpc: "1.76.0"}
{ py: "3.10", weaviate: $WEAVIATE_139, grpc: "1.59.0"},
{ py: "3.11", weaviate: $WEAVIATE_139, grpc: "1.66.0"},
{ py: "3.12", weaviate: $WEAVIATE_139, grpc: "1.70.0"},
{ py: "3.13", weaviate: $WEAVIATE_139, grpc: "1.72.1"},
{ py: "3.14", weaviate: $WEAVIATE_139, grpc: "1.76.0"}
]
optional_dependencies: [false]
steps:
Expand Down Expand Up @@ -320,7 +321,8 @@ jobs:
$WEAVIATE_134,
$WEAVIATE_135,
$WEAVIATE_136,
$WEAVIATE_137
$WEAVIATE_137,
$WEAVIATE_139
]
steps:
- name: Checkout
Expand Down
28 changes: 22 additions & 6 deletions integration/test_collection_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
WeaviateUnsupportedFeatureError,
)
from integration.conftest import retry_on_http_error
from weaviate.util import _ServerVersion


def _expected_async_enabled(version: _ServerVersion, factor: int) -> bool:
"""Whether the server reports async replication as enabled for a collection.

Up to 1.38 the server stores whatever `async_enabled` the collection was created with. From
1.39 it ignores that and derives the field as `factor > 1 and not globally disabled` instead,
so a collection with a single replica always reports `False`.
"""
if version.is_at_least(1, 39, 0):
return factor > 1
return version.is_at_least(1, 26, 0)


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -353,10 +366,9 @@ def test_collection_config_full(collection_factory: CollectionFactory) -> None:
assert config.multi_tenancy_config.auto_tenant_creation is False

assert config.replication_config.factor == 1
if collection._connection._weaviate_version.is_at_least(1, 26, 0):
assert config.replication_config.async_enabled is True
else:
assert config.replication_config.async_enabled is False
assert config.replication_config.async_enabled is _expected_async_enabled(
collection._connection._weaviate_version, factor=1
)

if collection._connection._weaviate_version.is_at_least(1, 24, 25):
assert (
Expand Down Expand Up @@ -1605,7 +1617,9 @@ def test_replication_config_with_async_config(collection_factory: CollectionFact
)
config = collection.config.get()
assert config.replication_config.factor == 1
assert config.replication_config.async_enabled is True
assert config.replication_config.async_enabled is _expected_async_enabled(
collection._connection._weaviate_version, factor=1
)
assert config.replication_config.async_config is not None
ac = config.replication_config.async_config
assert ac.propagation_concurrency == 4
Expand Down Expand Up @@ -1672,7 +1686,9 @@ def test_replication_config_remove_async_config(collection_factory: CollectionFa
),
)
config = collection.config.get()
assert config.replication_config.async_enabled is True
assert config.replication_config.async_enabled is _expected_async_enabled(
collection._connection._weaviate_version, factor=1
)
assert config.replication_config.async_config is None
assert config.replication_config.factor == 1

Expand Down
Loading