Skip to content

Commit f6060af

Browse files
authored
✨ Improve logging when un/archiving files and 2x faster compression times (ITISFoundation#3175)
1 parent 6c97c5e commit f6060af

File tree

33 files changed

+363
-275
lines changed

33 files changed

+363
-275
lines changed

.env-devel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ REGISTRY_URL=registry.osparc-master.speag.com
5555
REGISTRY_USER=admin
5656

5757
# NOTE: 172.17.0.1 is the docker0 interface, which redirect from inside a container onto the host network interface.
58+
R_CLONE_ENABLED=false
59+
R_CLONE_PROVIDER=MINIO
5860
S3_ACCESS_KEY=12345678
5961
S3_BUCKET_NAME=simcore
6062
S3_ENDPOINT=172.17.0.1:9001
6163
S3_SECRET_KEY=12345678
6264
S3_SECURE=0
63-
R_CLONE_PROVIDER=MINIO
65+
66+
6467

6568
SCICRUNCH_API_BASE_URL=https://scicrunch.org/api/1
6669
SCICRUNCH_API_KEY=REPLACE_ME_with_valid_api_key

ci/github/unit-testing/service-library.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ test_all() {
2727
--durations=10 \
2828
--log-date-format="%Y-%m-%d %H:%M:%S" \
2929
--log-format="%(asctime)s %(levelname)s %(message)s" \
30+
--numprocesses=auto \
3031
--verbose \
3132
-m "not heavy_load" \
3233
packages/service-library/tests

packages/models-library/src/models_library/service_settings_labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class PathMappingsLabel(BaseModel):
146146
description="optional list of paths which contents need to be persisted",
147147
)
148148

149-
state_exclude: Optional[list[str]] = Field(
149+
state_exclude: Optional[set[str]] = Field(
150150
None,
151151
description="optional list unix shell rules used to exclude files from the state",
152152
)

packages/models-library/tests/test_service_settings_labels.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
# pylint:disable=unused-argument
33
# pylint:disable=redefined-outer-name
44

5-
import json
65
from collections import namedtuple
76
from copy import deepcopy
87
from pprint import pformat
9-
from typing import Any, Type
8+
from typing import Any
109

1110
import pytest
1211
from models_library.service_settings_labels import (
@@ -84,7 +83,7 @@ def test_service_settings() -> None:
8483
),
8584
)
8685
def test_service_settings_model_examples(
87-
model_cls: Type[BaseModel], model_cls_examples: dict[str, dict[str, Any]]
86+
model_cls: type[BaseModel], model_cls_examples: dict[str, dict[str, Any]]
8887
) -> None:
8988
for name, example in model_cls_examples.items():
9089
print(name, ":", pformat(example))
@@ -97,7 +96,7 @@ def test_service_settings_model_examples(
9796
(SimcoreServiceLabels,),
9897
)
9998
def test_correctly_detect_dynamic_sidecar_boot(
100-
model_cls: Type[BaseModel], model_cls_examples: dict[str, dict[str, Any]]
99+
model_cls: type[BaseModel], model_cls_examples: dict[str, dict[str, Any]]
101100
) -> None:
102101
for name, example in model_cls_examples.items():
103102
print(name, ":", pformat(example))
@@ -128,7 +127,7 @@ def test_path_mappings_json_encoding() -> None:
128127
example = PathMappingsLabel.Config.schema_extra["example"]
129128
path_mappings = PathMappingsLabel.parse_obj(example)
130129
print(path_mappings)
131-
assert json.loads(path_mappings.json()) == example
130+
assert PathMappingsLabel.parse_raw(path_mappings.json()) == path_mappings
132131

133132

134133
def test_simcore_services_labels_compose_spec_null_container_http_entry_provided() -> None:

packages/service-library/requirements/_base.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ pydantic
1010
pyinstrument
1111
pyyaml
1212
tenacity
13+
tqdm

packages/service-library/requirements/_base.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ pyyaml==5.4.1
2121
# -r requirements/_base.in
2222
tenacity==8.0.1
2323
# via -r requirements/_base.in
24+
tqdm==4.64.0
25+
# via -r requirements/_base.in
2426
typing-extensions==4.2.0
2527
# via
2628
# aiodebug

packages/service-library/requirements/_test.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ pytest-instafail
2525
pytest-mock
2626
pytest-runner
2727
pytest-sugar
28+
pytest-xdist

packages/service-library/requirements/_test.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ docopt==0.6.2
7070
# via
7171
# coveralls
7272
# docker-compose
73+
execnet==1.9.0
74+
# via pytest-xdist
7375
faker==13.7.0
7476
# via -r requirements/_test.in
7577
flaky==3.7.0
@@ -128,7 +130,9 @@ platformdirs==2.5.2
128130
pluggy==1.0.0
129131
# via pytest
130132
py==1.11.0
131-
# via pytest
133+
# via
134+
# pytest
135+
# pytest-forked
132136
pycparser==2.21
133137
# via cffi
134138
pylint==2.13.8
@@ -148,9 +152,11 @@ pytest==7.1.2
148152
# pytest-asyncio
149153
# pytest-cov
150154
# pytest-docker
155+
# pytest-forked
151156
# pytest-instafail
152157
# pytest-mock
153158
# pytest-sugar
159+
# pytest-xdist
154160
pytest-aiohttp==1.0.4
155161
# via -r requirements/_test.in
156162
pytest-asyncio==0.18.3
@@ -159,6 +165,8 @@ pytest-cov==3.0.0
159165
# via -r requirements/_test.in
160166
pytest-docker==0.12.0
161167
# via -r requirements/_test.in
168+
pytest-forked==1.4.0
169+
# via pytest-xdist
162170
pytest-instafail==0.4.2
163171
# via -r requirements/_test.in
164172
pytest-mock==3.7.0
@@ -167,6 +175,8 @@ pytest-runner==6.0.0
167175
# via -r requirements/_test.in
168176
pytest-sugar==0.9.4
169177
# via -r requirements/_test.in
178+
pytest-xdist==2.5.0
179+
# via -r requirements/_test.in
170180
python-dateutil==2.8.2
171181
# via faker
172182
python-dotenv==0.20.0

0 commit comments

Comments
 (0)