From 7b04497d5c0a73d6d3a8279f70e1d97b112c05b0 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Martinez Date: Thu, 4 May 2023 12:58:00 +0200 Subject: [PATCH 1/5] test: try to get jac tests back up Signed-off-by: Joan Fontanals Martinez --- tests/integrations/store/test_jac.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/integrations/store/test_jac.py b/tests/integrations/store/test_jac.py index 86baef1f801..f2ede16b587 100644 --- a/tests/integrations/store/test_jac.py +++ b/tests/integrations/store/test_jac.py @@ -13,8 +13,6 @@ TOLERANCE_RATIO = 0.5 # Percentage of difference allowed in stream vs non-stream test RANDOM: str = uuid.uuid4().hex[:8] -pytestmark = [pytest.mark.skip] - @pytest.fixture(scope='session', autouse=True) def testing_namespace_cleanup(): @@ -68,7 +66,6 @@ def test_pushpull_correct(capsys): assert len(captured.err) == 0, 'No error should be printed when show_progress=False' -@pytest.mark.skip(reason='time out') @pytest.mark.slow @pytest.mark.internet def test_pushpull_stream_correct(capsys): @@ -100,7 +97,6 @@ def test_pushpull_stream_correct(capsys): assert len(captured.err) == 0, 'No error should be printed when show_progress=False' -@pytest.mark.skip(reason='time out') @pytest.mark.slow @pytest.mark.internet def test_pull_stream_vs_pull_full(): @@ -157,7 +153,6 @@ def get_total_full(url: str): ), 'Full pull memory usage should be dependent on the size of the data' -@pytest.mark.skip(reason='The CI account might be broken') @pytest.mark.slow @pytest.mark.internet def test_list_and_delete(): @@ -214,7 +209,6 @@ def test_list_and_delete(): ), 'Deleting a non-existent DA should return False' -@pytest.mark.skip(reason='time out') @pytest.mark.slow @pytest.mark.internet def test_concurrent_push_pull(): From 726d9e00ea4661b136452bc92e50f8be926712ae Mon Sep 17 00:00:00 2001 From: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> Date: Thu, 4 May 2023 14:34:36 +0200 Subject: [PATCH 2/5] fix: fix self reference bug in stream push Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> --- docarray/store/jac.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docarray/store/jac.py b/docarray/store/jac.py index 88caaf84dd2..732984003aa 100644 --- a/docarray/store/jac.py +++ b/docarray/store/jac.py @@ -267,10 +267,10 @@ def push_stream( # But it must be done this way for now because Hubble expects to know the length of the DocList # before it starts receiving the documents first_doc = next(docs) - docs = DocList[first_doc.__class__]([first_doc]) # type: ignore + _docs = DocList[first_doc.__class__]([first_doc]) # type: ignore for doc in docs: - docs.append(doc) - return cls.push(docs, name, public, show_progress, branding) + _docs.append(doc) + return cls.push(_docs, name, public, show_progress, branding) @staticmethod @hubble.login_required From dbda6859c20508679922712f12e9b7388c8bd79e Mon Sep 17 00:00:00 2001 From: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> Date: Thu, 4 May 2023 15:11:27 +0200 Subject: [PATCH 3/5] fix: correctly delete das used in tests Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> --- tests/integrations/store/test_jac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrations/store/test_jac.py b/tests/integrations/store/test_jac.py index f2ede16b587..87fd96f267d 100644 --- a/tests/integrations/store/test_jac.py +++ b/tests/integrations/store/test_jac.py @@ -32,7 +32,7 @@ def testing_namespace_cleanup(): ) ) for da_name in da_names: - JACDocStore.delete(f'jac://{da_name}') + JACDocStore.delete(f'{da_name}') @pytest.mark.slow From b4a52a4d76cf22985e0ec0a3f506d8e18a91f042 Mon Sep 17 00:00:00 2001 From: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> Date: Thu, 4 May 2023 15:12:24 +0200 Subject: [PATCH 4/5] fix: hardcode high page size Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> --- docarray/store/jac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docarray/store/jac.py b/docarray/store/jac.py index 732984003aa..a7bdaae696e 100644 --- a/docarray/store/jac.py +++ b/docarray/store/jac.py @@ -102,7 +102,7 @@ def list(namespace: str = '', show_table: bool = False) -> List[str]: from rich.table import Table resp = HubbleClient(jsonify=True).list_artifacts( - filter={'type': 'documentArray'}, sort={'createdAt': 1} + filter={'type': 'documentArray'}, sort={'createdAt': 1}, pageSize=10000, ) table = Table( From 2278a7ed86bd53b71e43622b795c43ca21ca634a Mon Sep 17 00:00:00 2001 From: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> Date: Thu, 4 May 2023 15:15:06 +0200 Subject: [PATCH 5/5] style: blacken Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com> --- docarray/store/jac.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docarray/store/jac.py b/docarray/store/jac.py index a7bdaae696e..2ca4920194f 100644 --- a/docarray/store/jac.py +++ b/docarray/store/jac.py @@ -102,7 +102,9 @@ def list(namespace: str = '', show_table: bool = False) -> List[str]: from rich.table import Table resp = HubbleClient(jsonify=True).list_artifacts( - filter={'type': 'documentArray'}, sort={'createdAt': 1}, pageSize=10000, + filter={'type': 'documentArray'}, + sort={'createdAt': 1}, + pageSize=10000, ) table = Table(