Skip to content

Commit eaea155

Browse files
authored
Merge branch 'dev/1.37' into feat/ascii-fold
2 parents 8e91984 + 9bea05a commit eaea155

39 files changed

Lines changed: 394 additions & 248 deletions

.github/workflows/main.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ env:
2222
WEAVIATE_128: 1.28.16
2323
WEAVIATE_129: 1.29.11
2424
WEAVIATE_130: 1.30.22
25-
WEAVIATE_131: 1.31.20
26-
WEAVIATE_132: 1.32.23
27-
WEAVIATE_133: 1.33.10
28-
WEAVIATE_134: 1.34.5
29-
WEAVIATE_135: 1.35.0
30-
WEAVIATE_136: 1.36.0
31-
WEAVIATE_137: 1.37.0-dev-29d5c87.amd64
32-
25+
WEAVIATE_131: 1.31.22
26+
WEAVIATE_132: 1.32.27
27+
WEAVIATE_133: 1.33.18
28+
WEAVIATE_134: 1.34.19
29+
WEAVIATE_135: 1.35.16-efdedfa
30+
WEAVIATE_136: 1.36.9-d905e6c
31+
WEAVIATE_137: 1.37.0-rc.0-b313954.amd64
3332

3433
jobs:
3534
lint-and-format:
@@ -310,7 +309,7 @@ jobs:
310309
$WEAVIATE_133,
311310
$WEAVIATE_134,
312311
$WEAVIATE_135,
313-
$WEAVIATE_136
312+
$WEAVIATE_136,
314313
$WEAVIATE_137
315314
]
316315
steps:

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ We currently support the following versions client versions:
2929

3030
- 4.X: actively supported
3131
- 3.X: deprecated, receives only critical bug fixes and dependency updates
32-
- copy of the 3.X branch in v4 releases: Will be removed on 2024-11-30
3332

3433

3534
Articles

docs/changelog.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Changelog
22
=========
33

4+
Version 4.20.5
5+
--------------
6+
This patch version includes:
7+
- Fix objectTTL config export
8+
- Add support for audio modality in multi2vec-google
9+
- Export FilterReturn from weaviate.classes.query
10+
- Fix updating async replication config
11+
- Remove unmaintained ``deprecated`` dependency
12+
- Throw exception on empty time filters
13+
414
Version 4.20.4
515
--------------
616
This patch version includes:

integration/conftest.py

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import os
22
import time
3+
import sys
4+
import threading
5+
import traceback
6+
import pytest
37
from typing import (
48
Any,
59
AsyncGenerator,
@@ -14,7 +18,6 @@
1418
)
1519
from typing import Callable, TypeVar
1620

17-
import pytest
1821
import pytest_asyncio
1922
from _pytest.fixtures import SubRequest
2023

@@ -500,3 +503,66 @@ def retry_on_http_error(
500503
raise
501504
# This should never be reached, but satisfies the type checker
502505
raise last_exception # type: ignore
506+
507+
508+
TIMEOUT_SECONDS = 300
509+
510+
511+
def dump_all_stacks():
512+
frames = sys._current_frames()
513+
lines = ["\n===== DEADLOCK DETECTED — THREAD DUMP =====\n"]
514+
for thread in threading.enumerate():
515+
frame = frames.get(thread.ident) # pyright: ignore
516+
lines.append(f"\n--- Thread: {thread.name} (id={thread.ident}) ---")
517+
if frame:
518+
lines.append("".join(traceback.format_stack(frame)))
519+
else:
520+
lines.append(" (no frame)\n")
521+
lines.append("===========================================\n")
522+
return "\n".join(lines)
523+
524+
525+
class DeadlockWatchdog:
526+
def __init__(self, timeout):
527+
self.timeout = timeout
528+
self._timer = None
529+
530+
def start(self, label):
531+
self._label = label
532+
self._timer = threading.Timer(self.timeout, self._on_timeout)
533+
self._timer.daemon = True
534+
self._timer.start()
535+
536+
def stop(self):
537+
if self._timer:
538+
self._timer.cancel()
539+
self._timer = None
540+
541+
def _on_timeout(self):
542+
sys.stderr.write(f"\n[WATCHDOG] Hung at: '{self._label}' after {self.timeout}s\n")
543+
sys.stderr.write(dump_all_stacks())
544+
sys.stderr.flush()
545+
os._exit(1) # Hard kill — works reliably in xdist workers
546+
547+
548+
_watchdog = DeadlockWatchdog(TIMEOUT_SECONDS)
549+
550+
551+
# Covers setup + call + teardown
552+
@pytest.hookimpl(hookwrapper=True)
553+
def pytest_runtest_protocol(item, nextitem):
554+
_watchdog.start(item.nodeid)
555+
try:
556+
yield
557+
finally:
558+
_watchdog.stop()
559+
560+
561+
# Separately watch session-scoped fixture setup
562+
@pytest.hookimpl(hookwrapper=True)
563+
def pytest_sessionstart(session):
564+
_watchdog.start("session startup / session-scoped fixtures")
565+
try:
566+
yield
567+
finally:
568+
_watchdog.stop()

integration/test_backup_v4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ def test_incremental_backup(client: weaviate.WeaviateClient, request: SubRequest
764764
backend=BACKEND,
765765
include_collections=["Article"],
766766
wait_for_completion=True,
767-
incremental_backup_base_id=base_backup_id,
767+
incremental_base_backup_id=base_backup_id,
768768
)
769769

770770
# remove existing class

integration/test_client.py

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def test_collection_name_capitalization(
334334
client.collections.delete(name_big)
335335

336336

337-
def test_client_cluster_with_lazy_shard_loading(
337+
def test_client_cluster_without_lazy_shard_loading(
338338
client: weaviate.WeaviateClient, request: SubRequest
339339
) -> None:
340340
try:
@@ -360,37 +360,6 @@ def test_client_cluster_with_lazy_shard_loading(
360360
client.collections.delete(request.node.name)
361361

362362

363-
def test_client_cluster_without_lazy_shard_loading(
364-
client_factory: ClientFactory, request: SubRequest
365-
) -> None:
366-
client = client_factory(8090, 50061)
367-
368-
try:
369-
collection = client.collections.create(
370-
name=request.node.name, vectorizer_config=Configure.Vectorizer.none()
371-
)
372-
373-
nodes = client.cluster.nodes(collection.name, output="verbose")
374-
assert len(nodes) == 1
375-
assert len(nodes[0].shards) == 1
376-
assert nodes[0].shards[0].collection == collection.name
377-
assert nodes[0].shards[0].object_count == 0
378-
assert nodes[0].shards[0].vector_indexing_status in [
379-
"READONLY",
380-
"INDEXING",
381-
"READY",
382-
"LAZY_LOADING",
383-
]
384-
assert nodes[0].shards[0].vector_queue_length == 0
385-
assert nodes[0].shards[0].compressed is False
386-
if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
387-
assert nodes[0].shards[0].loaded is True
388-
else:
389-
assert nodes[0].shards[0].loaded is False
390-
finally:
391-
client.collections.delete(request.node.name)
392-
393-
394363
def test_client_cluster_multitenant(client: weaviate.WeaviateClient, request: SubRequest) -> None:
395364
try:
396365
collection = client.collections.create(

integration/test_collection_config.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,10 @@ def test_replication_config_without_async_config(collection_factory: CollectionF
15891589

15901590

15911591
def test_replication_config_with_async_config(collection_factory: CollectionFactory) -> None:
1592+
collection_dummy = collection_factory("dummy")
1593+
if collection_dummy._connection._weaviate_version.is_lower_than(1, 34, 18):
1594+
pytest.skip("async replication config requires Weaviate >= 1.34.18")
1595+
15921596
collection = collection_factory(
15931597
replication_config=Configure.replication(
15941598
factor=1,
@@ -1730,15 +1734,15 @@ def test_replication_config_add_async_config_to_existing_collection(
17301734
collection.config.update(
17311735
replication_config=Reconfigure.replication(
17321736
async_config=Reconfigure.Replication.async_config(
1733-
max_workers=12,
1737+
max_workers=8,
17341738
propagation_concurrency=4,
17351739
),
17361740
),
17371741
)
17381742
config = collection.config.get()
17391743
assert config.replication_config.async_config is not None
17401744
ac = config.replication_config.async_config
1741-
assert ac.max_workers == 12
1745+
assert ac.max_workers == 8
17421746
assert ac.propagation_concurrency == 4
17431747

17441748

pytest.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
addopts = -m 'not profiling' --benchmark-skip -l
33
markers =
44
profiling: marks tests that can be profiled
5-
asyncio_default_fixture_loop_scope = function
5+
asyncio_default_fixture_loop_scope = function
6+
timeout = 300
7+
timeout_method = thread

requirements-devel.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ grpcio==1.75.1
55
grpcio-tools==1.75.1
66
grpcio-health-checking==1.75.1
77
pydantic==2.12.0
8-
deprecation==2.1.0
98

109
build
1110
twine

requirements-test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pytest-cov==6.2.1
33
pytest-asyncio==1.3.0
44
pytest-benchmark==5.1.0
55
pytest-profiling==1.8.1
6+
pytest-timeout==2.4.0
67
coverage==7.10.7
78
pytest-xdist==3.7.0
89
werkzeug==3.1.6

0 commit comments

Comments
 (0)