Skip to content

Commit f45ebaa

Browse files
committed
Merge branch 'master' into bugfix-tracing-exemplars
2 parents 68fd586 + 8f187a7 commit f45ebaa

File tree

46 files changed

+443
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+443
-214
lines changed

.env-devel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ WEBSERVER_EMAIL={}
379379
WEBSERVER_EXPORTER={}
380380
WEBSERVER_FOLDERS=1
381381
WEBSERVER_FRONTEND={}
382+
WEBSERVER_FUNCTIONS=1
382383
WEBSERVER_GARBAGE_COLLECTOR=null
383384
WEBSERVER_GROUPS=1
384385
WEBSERVER_GUNICORN_CMD_ARGS=--timeout=180

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ auto-doc: .stack-simcore-version.yml ## Auto generates diagrams for README.md
624624
# Updating docs/img
625625
@mv --verbose $<.png docs/img/
626626

627-
.PHONY: services.ignore.md
628-
services.ignore.md: ## Auto generates service.md
627+
.PHONY: SERVICES.md
628+
SERVICES.md: ## Auto generates service.md
629629
# Making $@
630630
scripts/echo_services_markdown.py > $@
631631

SERVICES.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# services
2+
>
3+
> Auto generated on `2025-05-26 09:50:15` using
4+
```cmd
5+
cd osparc-simcore
6+
python ./scripts/echo_services_markdown.py
7+
```
8+
| Name|Files| |
9+
| ----------|----------|---------- |
10+
| **AGENT**|| |
11+
| |[services/agent/Dockerfile](./services/agent/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/agent)](https://hub.docker.com/r/itisfoundation/agent/tags) |
12+
| **API-SERVER**|| |
13+
| |[services/api-server/openapi.json](./services/api-server/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/api-server/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/api-server/openapi.json) |
14+
| |[services/api-server/Dockerfile](./services/api-server/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/api-server)](https://hub.docker.com/r/itisfoundation/api-server/tags) |
15+
| **AUTOSCALING**|| |
16+
| |[services/autoscaling/Dockerfile](./services/autoscaling/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/autoscaling)](https://hub.docker.com/r/itisfoundation/autoscaling/tags) |
17+
| **CATALOG**|| |
18+
| |[services/catalog/openapi.json](./services/catalog/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/catalog/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/catalog/openapi.json) |
19+
| |[services/catalog/Dockerfile](./services/catalog/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/catalog)](https://hub.docker.com/r/itisfoundation/catalog/tags) |
20+
| **CLUSTERS-KEEPER**|| |
21+
| |[services/clusters-keeper/Dockerfile](./services/clusters-keeper/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/clusters-keeper)](https://hub.docker.com/r/itisfoundation/clusters-keeper/tags) |
22+
| **DASK-SIDECAR**|| |
23+
| |[services/dask-sidecar/Dockerfile](./services/dask-sidecar/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/dask-sidecar)](https://hub.docker.com/r/itisfoundation/dask-sidecar/tags) |
24+
| **DATCORE-ADAPTER**|| |
25+
| |[services/datcore-adapter/Dockerfile](./services/datcore-adapter/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/datcore-adapter)](https://hub.docker.com/r/itisfoundation/datcore-adapter/tags) |
26+
| **DIRECTOR**|| |
27+
| |[services/director/src/simcore_service_director/api/v0/openapi.yaml](./services/director/src/simcore_service_director/api/v0/openapi.yaml)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/director/src/simcore_service_director/api/v0/openapi.yaml) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/director/src/simcore_service_director/api/v0/openapi.yaml) |
28+
| |[services/director/Dockerfile](./services/director/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/director)](https://hub.docker.com/r/itisfoundation/director/tags) |
29+
| **DIRECTOR-V2**|| |
30+
| |[services/director-v2/openapi.json](./services/director-v2/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/director-v2/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/director-v2/openapi.json) |
31+
| |[services/director-v2/Dockerfile](./services/director-v2/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/director-v2)](https://hub.docker.com/r/itisfoundation/director-v2/tags) |
32+
| **DOCKER-API-PROXY**|| |
33+
| |[services/docker-api-proxy/Dockerfile](./services/docker-api-proxy/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/docker-api-proxy)](https://hub.docker.com/r/itisfoundation/docker-api-proxy/tags) |
34+
| **DYNAMIC-SCHEDULER**|| |
35+
| |[services/dynamic-scheduler/openapi.json](./services/dynamic-scheduler/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/dynamic-scheduler/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/dynamic-scheduler/openapi.json) |
36+
| |[services/dynamic-scheduler/Dockerfile](./services/dynamic-scheduler/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/dynamic-scheduler)](https://hub.docker.com/r/itisfoundation/dynamic-scheduler/tags) |
37+
| **DYNAMIC-SIDECAR**|| |
38+
| |[services/dynamic-sidecar/openapi.json](./services/dynamic-sidecar/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/dynamic-sidecar/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/dynamic-sidecar/openapi.json) |
39+
| |[services/dynamic-sidecar/Dockerfile](./services/dynamic-sidecar/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/dynamic-sidecar)](https://hub.docker.com/r/itisfoundation/dynamic-sidecar/tags) |
40+
| **EFS-GUARDIAN**|| |
41+
| |[services/efs-guardian/Dockerfile](./services/efs-guardian/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/efs-guardian)](https://hub.docker.com/r/itisfoundation/efs-guardian/tags) |
42+
| **INVITATIONS**|| |
43+
| |[services/invitations/openapi.json](./services/invitations/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/invitations/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/invitations/openapi.json) |
44+
| |[services/invitations/Dockerfile](./services/invitations/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/invitations)](https://hub.docker.com/r/itisfoundation/invitations/tags) |
45+
| **MIGRATION**|| |
46+
| |[services/migration/Dockerfile](./services/migration/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/migration)](https://hub.docker.com/r/itisfoundation/migration/tags) |
47+
| **NOTIFICATIONS**|| |
48+
| |[services/notifications/openapi.json](./services/notifications/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/notifications/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/notifications/openapi.json) |
49+
| |[services/notifications/Dockerfile](./services/notifications/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/notifications)](https://hub.docker.com/r/itisfoundation/notifications/tags) |
50+
| **PAYMENTS**|| |
51+
| |[services/payments/openapi.json](./services/payments/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/payments/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/payments/openapi.json) |
52+
| |[services/payments/Dockerfile](./services/payments/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/payments)](https://hub.docker.com/r/itisfoundation/payments/tags) |
53+
| **RESOURCE-USAGE-TRACKER**|| |
54+
| |[services/resource-usage-tracker/openapi.json](./services/resource-usage-tracker/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/resource-usage-tracker/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/resource-usage-tracker/openapi.json) |
55+
| |[services/resource-usage-tracker/Dockerfile](./services/resource-usage-tracker/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/resource-usage-tracker)](https://hub.docker.com/r/itisfoundation/resource-usage-tracker/tags) |
56+
| **STATIC-WEBSERVER**|| |
57+
| |[services/static-webserver/client/tools/qooxdoo-kit/builder/Dockerfile](./services/static-webserver/client/tools/qooxdoo-kit/builder/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/static-webserver)](https://hub.docker.com/r/itisfoundation/static-webserver/tags) |
58+
| |[services/static-webserver/client/qx_packages/ITISFoundation_qx-iconfont-material_v0_1_7/Dockerfile](./services/static-webserver/client/qx_packages/ITISFoundation_qx-iconfont-material_v0_1_7/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/static-webserver)](https://hub.docker.com/r/itisfoundation/static-webserver/tags) |
59+
| |[services/static-webserver/client/qx_packages/ITISFoundation_qx-iconfont-fontawesome5_v0_2_2/Dockerfile](./services/static-webserver/client/qx_packages/ITISFoundation_qx-iconfont-fontawesome5_v0_2_2/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/static-webserver)](https://hub.docker.com/r/itisfoundation/static-webserver/tags) |
60+
| |[services/static-webserver/client/qx_packages/ITISFoundation_qx-osparc-theme_v0_5_6/Dockerfile](./services/static-webserver/client/qx_packages/ITISFoundation_qx-osparc-theme_v0_5_6/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/static-webserver)](https://hub.docker.com/r/itisfoundation/static-webserver/tags) |
61+
| **STORAGE**|| |
62+
| |[services/storage/openapi.json](./services/storage/openapi.json)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/storage/openapi.json) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/storage/openapi.json) |
63+
| |[services/storage/Dockerfile](./services/storage/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/storage)](https://hub.docker.com/r/itisfoundation/storage/tags) |
64+
| **WEB**|| |
65+
| |[services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml](./services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml)|[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml) [![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml) |
66+
| |[services/web/Dockerfile](./services/web/Dockerfile)|[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/webserver)](https://hub.docker.com/r/itisfoundation/webserver/tags) |
67+
| || |
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
1-
from typing import Any
1+
from typing import Any, Final
22

33

4-
class UnSet:
5-
VALUE: "UnSet"
4+
class Unset:
5+
"""Sentinel value to indicate that a parameter is not set."""
66

7+
VALUE: "Unset"
78

8-
UnSet.VALUE = UnSet()
9+
10+
unuset: Final = Unset()
11+
Unset.VALUE = Unset()
912

1013

1114
def is_unset(v: Any) -> bool:
12-
return isinstance(v, UnSet)
15+
return isinstance(v, Unset)
1316

1417

1518
def is_set(v: Any) -> bool:
16-
return not isinstance(v, UnSet)
19+
return not isinstance(v, Unset)
1720

1821

1922
def as_dict_exclude_unset(**params) -> dict[str, Any]:
20-
return {k: v for k, v in params.items() if not isinstance(v, UnSet)}
23+
"""Excludes parameters that are instances of UnSet."""
24+
return {k: v for k, v in params.items() if not isinstance(v, Unset)}
2125

2226

2327
def as_dict_exclude_none(**params) -> dict[str, Any]:
28+
"""Analogous to `as_dict_exclude_unset` but with None.
29+
30+
Sometimes None is used as a sentinel value, use this function to exclude it.
31+
"""
2432
return {k: v for k, v in params.items() if v is not None}

packages/common-library/src/common_library/pagination_tools.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,25 @@ def total_number_of_pages(self) -> NonNegativeInt:
2929

3030

3131
def iter_pagination_params(
32-
offset: NonNegativeInt = 0,
33-
limit: PositiveInt = 100,
32+
*,
33+
limit: PositiveInt,
34+
offset: NonNegativeInt,
3435
total_number_of_items: NonNegativeInt | None = None,
3536
) -> Iterable[PageParams]:
37+
"""Iterates through pages of a collection by yielding PageParams for each page.
38+
39+
Args:
40+
limit: The maximum number of items to return in a single page.
41+
offset: The number of items to skip before starting to collect the items for the current page.
42+
total_number_of_items: The total count of items in the collection being paginated.
43+
Must be set during the first iteration if not provided initially.
44+
45+
Yields:
46+
PageParams for each page in the collection.
47+
48+
Raises:
49+
RuntimeError: If total_number_of_items is not set before first iteration or if it changes between iterations.
50+
"""
3651

3752
kwargs = {}
3853
if total_number_of_items:

packages/common-library/tests/test_exclude.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from typing import Any
22

3-
from common_library.exclude import UnSet, as_dict_exclude_none, as_dict_exclude_unset
3+
from common_library.exclude import Unset, as_dict_exclude_none, as_dict_exclude_unset
44

55

66
def test_as_dict_exclude_unset():
77
def f(
8-
par1: str | UnSet = UnSet.VALUE, par2: int | UnSet = UnSet.VALUE
8+
par1: str | Unset = Unset.VALUE, par2: int | Unset = Unset.VALUE
99
) -> dict[str, Any]:
1010
return as_dict_exclude_unset(par1=par1, par2=par2)
1111

packages/common-library/tests/test_pagination_tools.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ async def test_iter_pages_args(
3838

3939
num_pages = 0
4040
page_args = None
41-
for page_index, page_args in enumerate(iter_pagination_params(offset, limit)):
41+
for page_index, page_args in enumerate(
42+
iter_pagination_params(offset=offset, limit=limit)
43+
):
4244

4345
page_items, page_args.total_number_of_items = await get_page(
4446
page_args.offset_current, page_args.limit
@@ -74,7 +76,7 @@ def test_fails_if_total_number_of_items_not_set():
7476
RuntimeError,
7577
match="page_args.total_number_of_items = total_count",
7678
):
77-
for _ in iter_pagination_params(limit=2):
79+
for _ in iter_pagination_params(offset=0, limit=2):
7880
pass
7981

8082

@@ -83,6 +85,8 @@ def test_fails_if_total_number_of_items_changes():
8385
RuntimeError,
8486
match="total_number_of_items cannot change on every iteration",
8587
):
86-
for page_params in iter_pagination_params(limit=2, total_number_of_items=4):
88+
for page_params in iter_pagination_params(
89+
offset=0, limit=2, total_number_of_items=4
90+
):
8791
assert page_params.total_number_of_items == 4
8892
page_params.total_number_of_items += 1

packages/models-library/src/models_library/api_schemas_catalog/services.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ class ServiceSummary(CatalogOutputSchema):
177177
version: ServiceVersion
178178
name: str
179179
description: str
180-
181180
version_display: str | None = None
182-
183181
contact: LowerCaseEmailStr | None
184182

185183
@staticmethod
@@ -195,6 +193,14 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
195193
"version_display": _EXAMPLE_SLEEPER["version_display"],
196194
"contact": _EXAMPLE_SLEEPER["contact"],
197195
},
196+
{
197+
"key": _EXAMPLE_SLEEPER["key"],
198+
"version": "100.0.0",
199+
"name": "sleeper",
200+
"description": "short description",
201+
"version_display": "HUGE Release",
202+
"contact": "[email protected]",
203+
},
198204
{
199205
"key": _EXAMPLE_FILEPICKER["key"],
200206
"version": _EXAMPLE_FILEPICKER["version"],

0 commit comments

Comments
 (0)