Skip to content
Closed
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/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
WEAVIATE_134: 1.34.19
WEAVIATE_135: 1.35.18
WEAVIATE_136: 1.36.12
WEAVIATE_137: 1.37.1-4e61e26.amd64
WEAVIATE_137: 1.37.5

jobs:
lint-and-format:
Expand Down
43 changes: 21 additions & 22 deletions integration/test_collection_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ def test_config_export_and_recreate_from_dict(collection_factory: CollectionFact
Property(name="geo", data_type=DataType.GEO_COORDINATES),
Property(name="phone", data_type=DataType.PHONE_NUMBER),
Property(
name="field_index_searchable", data_type=DataType.TEXT, index_searchable=False
name="field_searchable_index", data_type=DataType.TEXT, index_searchable=False
),
Property(
name="field_index_range_filters_false",
Expand Down Expand Up @@ -1054,7 +1054,9 @@ def test_config_export_and_recreate_from_dict(collection_factory: CollectionFact
tokenization=Tokenization.FIELD,
),
Property(
name="nested_searchable", data_type=DataType.TEXT, index_searchable=False
name="nested_searchable_index",
data_type=DataType.TEXT,
index_searchable=False,
),
Property(
name="nested_filterable", data_type=DataType.TEXT, index_filterable=False
Expand Down Expand Up @@ -1598,7 +1600,6 @@ def test_replication_config_with_async_config(collection_factory: CollectionFact
factor=1,
async_enabled=True,
async_config=Configure.Replication.async_config(
max_workers=8,
hashtree_height=20,
),
),
Expand All @@ -1608,7 +1609,6 @@ def test_replication_config_with_async_config(collection_factory: CollectionFact
assert config.replication_config.async_enabled is True
assert config.replication_config.async_config is not None
ac = config.replication_config.async_config
assert ac.max_workers == 8
assert ac.hashtree_height == 20


Expand All @@ -1624,14 +1624,13 @@ def test_replication_config_remove_async_config_by_disabling_async_replication(
factor=1,
async_enabled=True,
async_config=Configure.Replication.async_config(
max_workers=8,
hashtree_height=20,
),
),
)
config = collection.config.get()
assert config.replication_config.async_config is not None
assert config.replication_config.async_config.max_workers == 8
assert config.replication_config.async_config.hashtree_height == 20

collection.config.update(
replication_config=Reconfigure.replication(
Expand All @@ -1653,14 +1652,13 @@ def test_replication_config_remove_async_config(collection_factory: CollectionFa
factor=1,
async_enabled=True,
async_config=Configure.Replication.async_config(
max_workers=8,
hashtree_height=20,
),
),
)
config = collection.config.get()
assert config.replication_config.async_config is not None
assert config.replication_config.async_config.max_workers == 8
assert config.replication_config.async_config.hashtree_height == 20

collection.config.update(
replication_config=Reconfigure.replication(
Expand All @@ -1677,38 +1675,41 @@ def test_replication_config_unset_single_async_field(
collection_factory: CollectionFactory,
) -> None:
collection_dummy = collection_factory("dummy")
if collection_dummy._connection._weaviate_version.is_lower_than(1, 36, 0):
pytest.skip("async replication config requires Weaviate >= 1.36.0")
if collection_dummy._connection._weaviate_version.is_lower_than(1, 37, 3):
pytest.skip(
"per-field async replication config (after max_workers removal) requires Weaviate >= 1.37.3"
)

collection = collection_factory(
replication_config=Configure.replication(
factor=1,
async_enabled=True,
async_config=Configure.Replication.async_config(
max_workers=8,
hashtree_height=20,
hashtree_height=16,
propagation_concurrency=4,
),
),
)
config = collection.config.get()
ac = config.replication_config.async_config
assert ac is not None
assert ac.max_workers == 8
assert ac.hashtree_height == 20
assert ac.hashtree_height == 16
assert ac.propagation_concurrency == 4

# Update with only max_workers — hashtree_height reverts to server default
# Update with only propagation_concurrency — the async config is replaced, so the
# unspecified hashtree_height reverts to the server default.
collection.config.update(
replication_config=Reconfigure.replication(
async_config=Reconfigure.Replication.async_config(
max_workers=8,
propagation_concurrency=7,
),
),
)
config = collection.config.get()
ac = config.replication_config.async_config
assert ac is not None
assert ac.max_workers == 8
assert ac.hashtree_height != 20
assert ac.propagation_concurrency == 7
assert ac.hashtree_height != 16


def test_replication_config_add_async_config_to_existing_collection(
Expand All @@ -1734,16 +1735,14 @@ def test_replication_config_add_async_config_to_existing_collection(
collection.config.update(
replication_config=Reconfigure.replication(
async_config=Reconfigure.Replication.async_config(
max_workers=8,
propagation_concurrency=4,
hashtree_height=20,
),
),
)
config = collection.config.get()
assert config.replication_config.async_config is not None
ac = config.replication_config.async_config
assert ac.max_workers == 8
assert ac.propagation_concurrency == 4
assert ac.hashtree_height == 20


def test_update_property_descriptions(collection_factory: CollectionFactory) -> None:
Expand Down