Skip to content

Commit bad9eda

Browse files
committed
merge master into bugfix-healthcheck-rabbitmq-cancelled-connection
2 parents 2a66955 + 1564d50 commit bad9eda

File tree

295 files changed

+4381
-2092
lines changed

Some content is hidden

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

295 files changed

+4381
-2092
lines changed

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ flag_management:
1818

1919
component_management:
2020
default_rules:
21+
carryforward: true
2122
statuses:
2223
- type: project
2324
target: auto

.env-devel

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ AGENT_VOLUMES_CLEANUP_S3_SECRET_KEY=12345678
2121
API_SERVER_DEV_FEATURES_ENABLED=0
2222
API_SERVER_LOGLEVEL=INFO
2323
API_SERVER_PROFILING=1
24+
API_SERVER_TRACING={}
2425
TRAEFIK_API_SERVER_INFLIGHTREQ_AMOUNT=25
2526

2627
AUTOSCALING_DASK=null
@@ -33,6 +34,7 @@ AUTOSCALING_LOGLEVEL=INFO
3334
AUTOSCALING_NODES_MONITORING=null
3435
AUTOSCALING_POLL_INTERVAL=10
3536
AUTOSCALING_SSM_ACCESS=null
37+
AUTOSCALING_TRACING={}
3638

3739
AWS_S3_CLI_S3=null
3840

@@ -44,6 +46,7 @@ CATALOG_PORT=8000
4446
CATALOG_PROFILING=1
4547
CATALOG_SERVICES_DEFAULT_RESOURCES='{"CPU": {"limit": 0.1, "reservation": 0.1}, "RAM": {"limit": 2147483648, "reservation": 2147483648}}'
4648
CATALOG_SERVICES_DEFAULT_SPECIFICATIONS='{}'
49+
CATALOG_TRACING={}
4750

4851
CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DEFAULT_CLUSTER_AUTH='{"type":"tls","tls_ca_file":"/home/scu/.dask/dask-crt.pem","tls_client_cert":"/home/scu/.dask/dask-crt.pem","tls_client_key":"/home/scu/.dask/dask-key.pem"}'
4952
CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DOCKER_IMAGE_TAG=master-github-latest
@@ -57,6 +60,7 @@ CLUSTERS_KEEPER_MAX_MISSED_HEARTBEATS_BEFORE_CLUSTER_TERMINATION=5
5760
CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES=null
5861
CLUSTERS_KEEPER_TASK_INTERVAL=30
5962
CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES=null
63+
CLUSTERS_KEEPER_TRACING={}
6064

6165
DASK_SCHEDULER_HOST=dask-scheduler
6266
DASK_SCHEDULER_PORT=8786
@@ -70,6 +74,7 @@ DIRECTOR_HOST=director
7074
DIRECTOR_PORT=8080
7175
DIRECTOR_REGISTRY_CACHING_TTL=900
7276
DIRECTOR_REGISTRY_CACHING=True
77+
DIRECTOR_TRACING={}
7378

7479
EFS_USER_ID=8006
7580
EFS_USER_NAME=efs
@@ -79,6 +84,10 @@ EFS_DNS_NAME=fs-xxx.efs.us-east-1.amazonaws.com
7984
EFS_MOUNTED_PATH=/tmp/efs
8085
EFS_PROJECT_SPECIFIC_DATA_DIRECTORY=project-specific-data
8186
EFS_ONLY_ENABLED_FOR_USERIDS=[]
87+
EFS_GUARDIAN_TRACING={}
88+
89+
# DATCORE_ADAPTER
90+
DATCORE_ADAPTER_TRACING={}
8291

8392
# DIRECTOR_V2 ----
8493
COMPUTATIONAL_BACKEND_DEFAULT_CLUSTER_AUTH='{"type":"tls","tls_ca_file":"/home/scu/.dask/dask-crt.pem","tls_client_cert":"/home/scu/.dask/dask-crt.pem","tls_client_key":"/home/scu/.dask/dask-key.pem"}'
@@ -88,7 +97,7 @@ COMPUTATIONAL_BACKEND_DEFAULT_FILE_LINK_TYPE=PRESIGNED
8897
COMPUTATIONAL_BACKEND_ON_DEMAND_CLUSTERS_FILE_LINK_TYPE=PRESIGNED
8998
DIRECTOR_V2_DEV_FEATURES_ENABLED=0
9099
DIRECTOR_V2_DYNAMIC_SCHEDULER_CLOSE_SERVICES_VIA_FRONTEND_WHEN_CREDITS_LIMIT_REACHED=1
91-
DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=0
100+
DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=PT0S
92101
DIRECTOR_V2_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS='{}'
93102
DIRECTOR_V2_HOST=director-v2
94103
DIRECTOR_V2_LOGLEVEL=INFO
@@ -105,10 +114,13 @@ DYNAMIC_SIDECAR_LOG_LEVEL=DEBUG
105114
DYNAMIC_SIDECAR_PROMETHEUS_MONITORING_NETWORKS=[]
106115
DYNAMIC_SIDECAR_PROMETHEUS_SERVICE_LABELS={}
107116
DYNAMIC_SIDECAR_API_SAVE_RESTORE_STATE_TIMEOUT=3600
108-
# DIRECTOR_V2 ----
117+
DIRECTOR_V2_TRACING={}
118+
119+
# DYNAMIC_SCHEDULER ----
109120
DYNAMIC_SCHEDULER_LOGLEVEL=DEBUG
110121
DYNAMIC_SCHEDULER_PROFILING=1
111-
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=3600
122+
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=PT1H
123+
DYNAMIC_SCHEDULER_TRACING={}
112124

113125
FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]", "affiliation": "unknown"}}'
114126

@@ -122,6 +134,7 @@ INVITATIONS_PORT=8000
122134
INVITATIONS_SECRET_KEY='REPLACE_ME_with_result__Fernet_generate_key='
123135
INVITATIONS_SWAGGER_API_DOC_ENABLED=1
124136
INVITATIONS_USERNAME=admin
137+
INVITATIONS_TRACING={}
125138

126139
LOG_FORMAT_LOCAL_DEV_ENABLED=1
127140
LOG_FILTER_MAPPING='{}'
@@ -146,6 +159,7 @@ PAYMENTS_STRIPE_API_SECRET='REPLACE_ME_with_api_secret'
146159
PAYMENTS_STRIPE_URL=https://api.stripe.com
147160
PAYMENTS_SWAGGER_API_DOC_ENABLED=1
148161
PAYMENTS_USERNAME=admin
162+
PAYMENTS_TRACING={}
149163

150164
POSTGRES_DB=simcoredb
151165
POSTGRES_ENDPOINT=postgres:5432
@@ -185,6 +199,7 @@ RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_CHECK_ENABLED=1
185199
RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_COUNTER_FAIL=6
186200
RESOURCE_USAGE_TRACKER_MISSED_HEARTBEAT_INTERVAL_SEC=300
187201
RESOURCE_USAGE_TRACKER_S3=null
202+
RESOURCE_USAGE_TRACKER_TRACING={}
188203

189204
# NOTE: 172.17.0.1 is the docker0 interface, which redirect from inside a container onto the host network interface.
190205
R_CLONE_OPTION_BUFFER_SIZE=0M
@@ -218,6 +233,7 @@ STORAGE_HOST=storage
218233
STORAGE_LOGLEVEL=INFO
219234
STORAGE_PORT=8080
220235
STORAGE_PROFILING=1
236+
STORAGE_TRACING={}
221237
# STORAGE ----
222238

223239
SWARM_STACK_NAME=master-simcore

.github/workflows/ci-testing-deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,51 @@ jobs:
450450
with:
451451
token: ${{ secrets.CODECOV_TOKEN }}
452452

453+
unit-test-webserver-04:
454+
needs: changes
455+
if: ${{ needs.changes.outputs.webserver == 'true' || github.event_name == 'push' }}
456+
timeout-minutes: 25 # if this timeout gets too small, then split the tests
457+
name: "[unit] webserver 04"
458+
runs-on: ${{ matrix.os }}
459+
strategy:
460+
matrix:
461+
python: ["3.11"]
462+
os: [ubuntu-22.04]
463+
fail-fast: false
464+
steps:
465+
- uses: actions/checkout@v4
466+
- name: setup docker buildx
467+
id: buildx
468+
uses: docker/setup-buildx-action@v3
469+
with:
470+
driver: docker-container
471+
- name: setup python environment
472+
uses: actions/setup-python@v5
473+
with:
474+
python-version: ${{ matrix.python }}
475+
- name: install uv
476+
uses: astral-sh/setup-uv@v3
477+
with:
478+
version: "0.4.x"
479+
enable-cache: false
480+
cache-dependency-glob: "**/web/server/requirements/ci.txt"
481+
- name: show system version
482+
run: ./ci/helpers/show_system_versions.bash
483+
- name: install webserver
484+
run: ./ci/github/unit-testing/webserver.bash install
485+
- name: test
486+
run: ./ci/github/unit-testing/webserver.bash test_with_db 04
487+
- uses: codecov/[email protected]
488+
env:
489+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
490+
with:
491+
flags: unittests #optional
492+
- name: Upload test results to Codecov
493+
if: ${{ !cancelled() }}
494+
uses: codecov/test-results-action@v1
495+
with:
496+
token: ${{ secrets.CODECOV_TOKEN }}
497+
453498
unit-test-storage:
454499
needs: changes
455500
if: ${{ needs.changes.outputs.storage == 'true' || github.event_name == 'push' }}
@@ -1875,6 +1920,7 @@ jobs:
18751920
unit-test-webserver-01,
18761921
unit-test-webserver-02,
18771922
unit-test-webserver-03,
1923+
unit-test-webserver-04,
18781924
]
18791925
runs-on: ubuntu-latest
18801926
steps:

api/specs/web-server/_folders.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from models_library.workspaces import WorkspaceID
2222
from pydantic import Json
2323
from simcore_service_webserver._meta import API_VTAG
24-
from simcore_service_webserver.folders._folders_handlers import FoldersPathParams
24+
from simcore_service_webserver.folders._models import FolderFilters, FoldersPathParams
2525

2626
router = APIRouter(
2727
prefix=f"/{API_VTAG}",
@@ -30,8 +30,6 @@
3030
],
3131
)
3232

33-
### Folders
34-
3533

3634
@router.post(
3735
"/folders",
@@ -57,6 +55,10 @@ async def list_folders(
5755
example='{"field": "name", "direction": "desc"}',
5856
),
5957
] = '{"field": "modified_at", "direction": "desc"}',
58+
filters: Annotated[
59+
Json | None,
60+
Query(description=FolderFilters.schema_json(indent=1)),
61+
] = None,
6062
):
6163
...
6264

api/specs/web-server/_groups.py

Lines changed: 66 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@
88

99
from fastapi import APIRouter, Depends, status
1010
from models_library.api_schemas_webserver.groups import (
11-
AllUsersGroups,
11+
GroupCreate,
12+
GroupGet,
13+
GroupUpdate,
1214
GroupUserGet,
13-
UsersGroup,
15+
MyGroupsGet,
1416
)
1517
from models_library.generics import Envelope
16-
from models_library.users import GroupID, UserID
1718
from simcore_service_webserver._meta import API_VTAG
18-
from simcore_service_webserver.groups._handlers import _ClassifiersQuery
19+
from simcore_service_webserver.groups._handlers import (
20+
GroupUserAdd,
21+
GroupUserUpdate,
22+
_ClassifiersQuery,
23+
_GroupPathParams,
24+
_GroupUserPathParams,
25+
)
1926
from simcore_service_webserver.scicrunch.models import ResearchResource, ResourceHit
2027

2128
router = APIRouter(
@@ -28,106 +35,130 @@
2835

2936
@router.get(
3037
"/groups",
31-
response_model=Envelope[AllUsersGroups],
38+
response_model=Envelope[MyGroupsGet],
3239
)
3340
async def list_groups():
34-
...
41+
"""
42+
List all groups (organizations, primary, everyone and products) I belong to
43+
"""
3544

3645

3746
@router.post(
3847
"/groups",
39-
response_model=Envelope[UsersGroup],
48+
response_model=Envelope[GroupGet],
4049
status_code=status.HTTP_201_CREATED,
4150
)
42-
async def create_group():
43-
...
51+
async def create_group(_b: GroupCreate):
52+
"""
53+
Creates an organization group
54+
"""
4455

4556

4657
@router.get(
4758
"/groups/{gid}",
48-
response_model=Envelope[UsersGroup],
59+
response_model=Envelope[GroupGet],
4960
)
50-
async def get_group(gid: GroupID):
51-
...
61+
async def get_group(_p: Annotated[_GroupPathParams, Depends()]):
62+
"""
63+
Get an organization group
64+
"""
5265

5366

5467
@router.patch(
5568
"/groups/{gid}",
56-
response_model=Envelope[UsersGroup],
69+
response_model=Envelope[GroupGet],
5770
)
58-
async def update_group(gid: GroupID, _update: UsersGroup):
59-
...
71+
async def update_group(
72+
_p: Annotated[_GroupPathParams, Depends()],
73+
_b: GroupUpdate,
74+
):
75+
"""
76+
Updates organization groups
77+
"""
6078

6179

6280
@router.delete(
6381
"/groups/{gid}",
6482
status_code=status.HTTP_204_NO_CONTENT,
6583
)
66-
async def delete_group(gid: GroupID):
67-
...
84+
async def delete_group(_p: Annotated[_GroupPathParams, Depends()]):
85+
"""
86+
Deletes organization groups
87+
"""
6888

6989

7090
@router.get(
7191
"/groups/{gid}/users",
7292
response_model=Envelope[list[GroupUserGet]],
7393
)
74-
async def get_group_users(gid: GroupID):
75-
...
94+
async def get_all_group_users(_p: Annotated[_GroupPathParams, Depends()]):
95+
"""
96+
Gets users in organization groups
97+
"""
7698

7799

78100
@router.post(
79101
"/groups/{gid}/users",
80102
status_code=status.HTTP_204_NO_CONTENT,
81103
)
82104
async def add_group_user(
83-
gid: GroupID,
84-
_new: GroupUserGet,
105+
_p: Annotated[_GroupPathParams, Depends()],
106+
_b: GroupUserAdd,
85107
):
86-
...
108+
"""
109+
Adds a user to an organization group
110+
"""
87111

88112

89113
@router.get(
90114
"/groups/{gid}/users/{uid}",
91115
response_model=Envelope[GroupUserGet],
92116
)
93117
async def get_group_user(
94-
gid: GroupID,
95-
uid: UserID,
118+
_p: Annotated[_GroupUserPathParams, Depends()],
96119
):
97-
...
120+
"""
121+
Gets specific user in an organization group
122+
"""
98123

99124

100125
@router.patch(
101126
"/groups/{gid}/users/{uid}",
102127
response_model=Envelope[GroupUserGet],
103128
)
104129
async def update_group_user(
105-
gid: GroupID,
106-
uid: UserID,
107-
_update: GroupUserGet,
130+
_p: Annotated[_GroupUserPathParams, Depends()],
131+
_b: GroupUserUpdate,
108132
):
109-
# FIXME: update type
110-
...
133+
"""
134+
Updates user (access-rights) to an organization group
135+
"""
111136

112137

113138
@router.delete(
114139
"/groups/{gid}/users/{uid}",
115140
status_code=status.HTTP_204_NO_CONTENT,
116141
)
117142
async def delete_group_user(
118-
gid: GroupID,
119-
uid: UserID,
143+
_p: Annotated[_GroupUserPathParams, Depends()],
120144
):
121-
...
145+
"""
146+
Removes a user from an organization group
147+
"""
148+
149+
150+
#
151+
# Classifiers
152+
#
122153

123154

124155
@router.get(
125156
"/groups/{gid}/classifiers",
126157
response_model=Envelope[dict[str, Any]],
127158
)
128159
async def get_group_classifiers(
129-
gid: GroupID,
130-
_query: Annotated[_ClassifiersQuery, Depends()],
160+
_p: Annotated[_GroupPathParams, Depends()],
161+
_q: Annotated[_ClassifiersQuery, Depends()],
131162
):
132163
...
133164

0 commit comments

Comments
 (0)