Skip to content

Commit 8b7d4c9

Browse files
authored
Merge branch 'master' into pr-osparc-reroute-update-projects-networks
2 parents 6c69791 + 95d208b commit 8b7d4c9

File tree

118 files changed

+2087
-843
lines changed

Some content is hidden

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

118 files changed

+2087
-843
lines changed

.codecov.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ flag_management:
1010
statuses:
1111
- type: project
1212
target: auto
13-
threshold: 1%
13+
threshold: 2%
1414
- type: patch
1515
target: auto
16-
threshold: 1%
16+
threshold: 2%
1717

1818

1919
component_management:
@@ -22,7 +22,7 @@ component_management:
2222
statuses:
2323
- type: project
2424
target: auto
25-
threshold: 1%
25+
threshold: 2%
2626
branches:
2727
- "!master"
2828
individual_components:
@@ -116,12 +116,12 @@ coverage:
116116
project:
117117
default:
118118
informational: true
119-
threshold: 1%
119+
threshold: 2%
120120

121121
patch:
122122
default:
123123
informational: true
124-
threshold: 1%
124+
threshold: 2%
125125

126126
comment:
127127
layout: "header,diff,flags,components,footer"

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ jobs:
772772
if: ${{ !cancelled() }}
773773
run: ./ci/github/unit-testing/catalog.bash test
774774
- name: upload failed tests logs
775-
if: ${{ !cancelled() }}
775+
if: ${{ failure() }}
776776
uses: actions/upload-artifact@v4
777777
with:
778778
name: ${{ github.job }}_docker_logs
@@ -879,7 +879,7 @@ jobs:
879879
if: ${{ !cancelled() }}
880880
run: ./ci/github/unit-testing/datcore-adapter.bash test
881881
- name: upload failed tests logs
882-
if: ${{ !cancelled() }}
882+
if: ${{ failure() }}
883883
uses: actions/upload-artifact@v4
884884
with:
885885
name: ${{ github.job }}_docker_logs
@@ -930,7 +930,7 @@ jobs:
930930
if: ${{ !cancelled() }}
931931
run: ./ci/github/unit-testing/director.bash test
932932
- name: upload failed tests logs
933-
if: ${{ !cancelled() }}
933+
if: ${{ failure() }}
934934
uses: actions/upload-artifact@v4
935935
with:
936936
name: ${{ github.job }}_docker_logs
@@ -981,7 +981,7 @@ jobs:
981981
if: ${{ !cancelled() }}
982982
run: ./ci/github/unit-testing/director-v2.bash test
983983
- name: upload failed tests logs
984-
if: ${{ !cancelled() }}
984+
if: ${{ failure() }}
985985
uses: actions/upload-artifact@v4
986986
with:
987987
name: ${{ github.job }}_docker_logs
@@ -1910,7 +1910,7 @@ jobs:
19101910
- name: test
19111911
run: ./ci/github/integration-testing/webserver.bash test 01
19121912
- name: upload failed tests logs
1913-
if: ${{ !cancelled() }}
1913+
if: ${{ failure() }}
19141914
uses: actions/upload-artifact@v4
19151915
with:
19161916
name: ${{ github.job }}_docker_logs
@@ -1974,7 +1974,7 @@ jobs:
19741974
- name: test
19751975
run: ./ci/github/integration-testing/webserver.bash test 02
19761976
- name: upload failed tests logs
1977-
if: ${{ !cancelled() }}
1977+
if: ${{ failure() }}
19781978
uses: actions/upload-artifact@v4
19791979
with:
19801980
name: ${{ github.job }}_docker_logs
@@ -2038,7 +2038,7 @@ jobs:
20382038
- name: test
20392039
run: ./ci/github/integration-testing/director-v2.bash test 01
20402040
- name: upload failed tests logs
2041-
if: ${{ !cancelled() }}
2041+
if: ${{ failure() }}
20422042
uses: actions/upload-artifact@v4
20432043
with:
20442044
name: ${{ github.job }}_docker_logs
@@ -2111,7 +2111,7 @@ jobs:
21112111
- name: test
21122112
run: ./ci/github/integration-testing/director-v2.bash test 02
21132113
- name: upload failed tests logs
2114-
if: ${{ !cancelled() }}
2114+
if: ${{ failure() }}
21152115
uses: actions/upload-artifact@v4
21162116
with:
21172117
name: ${{ github.job }}_docker_logs
@@ -2177,7 +2177,7 @@ jobs:
21772177
- name: test
21782178
run: ./ci/github/integration-testing/dynamic-sidecar.bash test 01
21792179
- name: upload failed tests logs
2180-
if: ${{ !cancelled() }}
2180+
if: ${{ failure() }}
21812181
uses: actions/upload-artifact@v4
21822182
with:
21832183
name: ${{ github.job }}_docker_logs
@@ -2241,7 +2241,7 @@ jobs:
22412241
- name: test
22422242
run: ./ci/github/integration-testing/simcore-sdk.bash test
22432243
- name: upload failed tests logs
2244-
if: ${{ !cancelled() }}
2244+
if: ${{ failure() }}
22452245
uses: actions/upload-artifact@v4
22462246
with:
22472247
name: ${{ github.job }}_docker_logs
@@ -2330,7 +2330,7 @@ jobs:
23302330
- name: test
23312331
run: ./ci/github/system-testing/public-api.bash test
23322332
- name: upload failed tests logs
2333-
if: ${{ !cancelled() }}
2333+
if: ${{ failure() }}
23342334
uses: actions/upload-artifact@v4
23352335
with:
23362336
name: ${{ github.job }}_docker_logs
@@ -2395,7 +2395,7 @@ jobs:
23952395
name: ${{ github.job }}_services_settings_schemas
23962396
path: ./services/**/settings-schema.json
23972397
- name: upload failed tests logs
2398-
if: ${{ !cancelled() }}
2398+
if: ${{ failure() }}
23992399
uses: actions/upload-artifact@v4
24002400
with:
24012401
name: ${{ github.job }}_docker_logs

packages/models-library/src/models_library/api_schemas_webserver/licensed_items.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from models_library.licensed_items import LicensedItemID, LicensedResourceType
55
from models_library.resource_tracker import PricingPlanId
6-
from pydantic import PositiveInt
6+
from pydantic import ConfigDict, PositiveInt
77

88
from ._base import OutputSchema
99

@@ -15,6 +15,20 @@ class LicensedItemGet(OutputSchema):
1515
pricing_plan_id: PricingPlanId
1616
created_at: datetime
1717
modified_at: datetime
18+
model_config = ConfigDict(
19+
json_schema_extra={
20+
"examples": [
21+
{
22+
"licensed_item_id": "0362b88b-91f8-4b41-867c-35544ad1f7a1",
23+
"name": "best-model",
24+
"licensed_resource_type": f"{LicensedResourceType.VIP_MODEL}",
25+
"pricing_plan_id": "15",
26+
"created_at": "2024-12-12 09:59:26.422140",
27+
"modified_at": "2024-12-12 09:59:26.422140",
28+
}
29+
]
30+
}
31+
)
1832

1933

2034
class LicensedItemGetPage(NamedTuple):

packages/pytest-simcore/src/pytest_simcore/helpers/aws_ec2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ async def assert_autoscaled_dynamic_ec2_instances(
4242
expected_instance_state: InstanceStateNameType,
4343
expected_additional_tag_keys: list[str],
4444
instance_filters: Sequence[FilterTypeDef] | None,
45+
expected_user_data: list[str] | None = None,
4546
) -> list[InstanceTypeDef]:
47+
if expected_user_data is None:
48+
expected_user_data = ["docker swarm join"]
4649
return await assert_ec2_instances(
4750
ec2_client,
4851
expected_num_reservations=expected_num_reservations,
@@ -54,7 +57,7 @@ async def assert_autoscaled_dynamic_ec2_instances(
5457
"io.simcore.autoscaling.monitored_services_labels",
5558
*expected_additional_tag_keys,
5659
],
57-
expected_user_data=["docker swarm join"],
60+
expected_user_data=expected_user_data,
5861
instance_filters=instance_filters,
5962
)
6063

services/api-server/src/simcore_service_api_server/api/dependencies/rabbitmq.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@
66
from servicelib.aiohttp.application_setup import ApplicationSetupError
77
from servicelib.fastapi.dependencies import get_app
88
from servicelib.rabbitmq import RabbitMQClient
9+
from servicelib.rabbitmq._client_rpc import RabbitMQRPCClient
910
from tenacity import before_sleep_log, retry, stop_after_delay, wait_fixed
1011

11-
from ...services.log_streaming import LogDistributor
12+
from ...services_http.log_streaming import LogDistributor
1213

1314
_MAX_WAIT_FOR_LOG_DISTRIBUTOR_SECONDS: Final[int] = 10
1415

1516
_logger = logging.getLogger(__name__)
1617

1718

19+
def get_rabbitmq_rpc_client(
20+
app: Annotated[FastAPI, Depends(get_app)]
21+
) -> RabbitMQRPCClient:
22+
assert app.state.rabbitmq_rpc_client # nosec
23+
return cast(RabbitMQRPCClient, app.state.rabbitmq_rpc_client)
24+
25+
1826
def get_rabbitmq_client(app: Annotated[FastAPI, Depends(get_app)]) -> RabbitMQClient:
1927
assert app.state.rabbitmq_client # nosec
2028
return cast(RabbitMQClient, app.state.rabbitmq_client)

services/api-server/src/simcore_service_api_server/api/dependencies/webserver.py renamed to services/api-server/src/simcore_service_api_server/api/dependencies/webserver_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from ..._constants import MSG_BACKEND_SERVICE_UNAVAILABLE
1111
from ...core.settings import ApplicationSettings, WebServerSettings
12-
from ...services.webserver import AuthSession
12+
from ...services_http.webserver import AuthSession
1313
from .application import get_app, get_settings
1414
from .authentication import Identity, get_active_user_email, get_current_identity
1515

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from typing import Annotated, cast
2+
3+
from fastapi import Depends, FastAPI
4+
from servicelib.fastapi.dependencies import get_app
5+
6+
from ...services_rpc.wb_api_server import WbApiRpcClient
7+
8+
9+
async def get_wb_api_rpc_client(
10+
app: Annotated[FastAPI, Depends(get_app)]
11+
) -> WbApiRpcClient:
12+
assert app.state.wb_api_rpc_client # nosec
13+
return cast(WbApiRpcClient, app.state.wb_api_rpc_client)

services/api-server/src/simcore_service_api_server/api/root.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .routes import (
88
files,
99
health,
10+
licensed_items,
1011
meta,
1112
solvers,
1213
solvers_jobs,
@@ -40,6 +41,9 @@ def create_router(settings: ApplicationSettings):
4041
router.include_router(studies_jobs.router, tags=["studies"], prefix="/studies")
4142
router.include_router(wallets.router, tags=["wallets"], prefix="/wallets")
4243
router.include_router(_credits.router, tags=["credits"], prefix="/credits")
44+
router.include_router(
45+
licensed_items.router, tags=["licensed-items"], prefix="/licensed-items"
46+
)
4347

4448
# NOTE: multiple-files upload is currently disabled
4549
# Web form to upload files at http://localhost:8000/v0/upload-form-view

services/api-server/src/simcore_service_api_server/api/routes/credits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from fastapi import APIRouter, Depends, status
44

55
from ...models.schemas.model_adapter import GetCreditPriceLegacy
6-
from ..dependencies.webserver import AuthSession, get_webserver_session
6+
from ..dependencies.webserver_http import AuthSession, get_webserver_session
77
from ._constants import FMSG_CHANGELOG_NEW_IN_VERSION
88

99
router = APIRouter()

services/api-server/src/simcore_service_api_server/api/routes/files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
FileUploadData,
3838
UploadLinks,
3939
)
40-
from ...services.storage import StorageApi, StorageFileMetaData, to_file_api_model
40+
from ...services_http.storage import StorageApi, StorageFileMetaData, to_file_api_model
4141
from ..dependencies.authentication import get_current_user_id
4242
from ..dependencies.services import get_api_client
4343
from ._common import API_SERVER_DEV_FEATURES_ENABLED

0 commit comments

Comments
 (0)