Skip to content

Commit e2a4edd

Browse files
author
Joan Martinez
committed
test: fix some tests
1 parent 155e919 commit e2a4edd

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ jobs:
528528
matrix:
529529
core: ['', 'true']
530530
perf: ['', 'true']
531-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
531+
python-version: ["3.8", "3.9", "3.10", "3.11"]
532532
exclude:
533533
- core: 'true'
534534
perf: 'true'

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ jobs:
763763
matrix:
764764
core: ['', 'true']
765765
perf: ['', 'true']
766-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
766+
python-version: ["3.8", "3.9", "3.10", "3.11"]
767767
exclude:
768768
- core: 'true'
769769
perf: 'true'

jina/_docarray_legacy.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from __future__ import annotations
2-
2+
import os
33
from docarray import BaseDoc
44
from docarray import DocList
55

6-
docarray_v2 = True
7-
6+
from pydantic import Field
87
from typing import Any, Dict, Optional, List, Union
98

10-
from docarray.typing import AnyEmbedding, AnyTensor
9+
from docarray.typing import ID, AnyEmbedding, AnyTensor
10+
docarray_v2 = True
1111

1212

1313
class LegacyDocumentJina(BaseDoc):
@@ -37,6 +37,10 @@ class LegacyDocumentJina(BaseDoc):
3737
```
3838
3939
"""
40+
id: Optional[ID] = Field(
41+
description='The ID of the BaseDoc. This is useful for indexing in vector stores. If not set by user, it will automatically be assigned a random value',
42+
default_factory=lambda: ID(os.urandom(16).hex()),
43+
)
4044

4145
tensor: Optional[AnyTensor] = None
4246
chunks: Optional[Union[DocList[LegacyDocumentJina], List[LegacyDocumentJina]]] = None

tests/integration/stateful/test_stateful.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def test_stateful_index_search_container(
224224

225225
dep = Deployment(
226226
uses='docker://stateful-exec',
227+
protocol='http',
227228
replicas=replicas,
228229
stateful=True,
229230
raft_configuration={
@@ -258,6 +259,7 @@ def test_stateful_index_search_container(
258259

259260
dep_restore = Deployment(
260261
uses='docker://stateful-exec',
262+
protocol='http',
261263
replicas=replicas,
262264
stateful=True,
263265
raft_configuration={

0 commit comments

Comments
 (0)