Skip to content

Commit e22bb93

Browse files
committed
merge master into 6948-expose-licensing-endpoints-api-server
2 parents 8a52ec3 + 4659473 commit e22bb93

File tree

371 files changed

+9583
-3820
lines changed

Some content is hidden

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

371 files changed

+9583
-3820
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: 5%
1414
- type: patch
1515
target: auto
16-
threshold: 1%
16+
threshold: 5%
1717

1818

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

121121
patch:
122122
default:
123123
informational: true
124-
threshold: 1%
124+
threshold: 5%
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

api/specs/web-server/_admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
response_model=Envelope[Union[EmailTestFailed, EmailTestPassed]],
2929
)
3030
async def test_email(
31-
_test: TestEmail, x_simcore_products_name: str | None = Header(default=None)
31+
_body: TestEmail, x_simcore_products_name: str | None = Header(default=None)
3232
):
3333
# X-Simcore-Products-Name
3434
...

api/specs/web-server/_groups.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# pylint: disable=too-many-arguments
55

66

7+
from enum import Enum
78
from typing import Annotated, Any
89

910
from fastapi import APIRouter, Depends, status
@@ -87,19 +88,24 @@ async def delete_group(_path: Annotated[GroupsPathParams, Depends()]):
8788
"""
8889

8990

91+
_extra_tags: list[str | Enum] = ["users"]
92+
93+
9094
@router.get(
9195
"/groups/{gid}/users",
9296
response_model=Envelope[list[GroupUserGet]],
97+
tags=_extra_tags,
9398
)
9499
async def get_all_group_users(_path: Annotated[GroupsPathParams, Depends()]):
95100
"""
96-
Gets users in organization groups
101+
Gets users in organization or primary groups
97102
"""
98103

99104

100105
@router.post(
101106
"/groups/{gid}/users",
102107
status_code=status.HTTP_204_NO_CONTENT,
108+
tags=_extra_tags,
103109
)
104110
async def add_group_user(
105111
_path: Annotated[GroupsPathParams, Depends()],
@@ -113,6 +119,7 @@ async def add_group_user(
113119
@router.get(
114120
"/groups/{gid}/users/{uid}",
115121
response_model=Envelope[GroupUserGet],
122+
tags=_extra_tags,
116123
)
117124
async def get_group_user(
118125
_path: Annotated[GroupsUsersPathParams, Depends()],
@@ -125,6 +132,7 @@ async def get_group_user(
125132
@router.patch(
126133
"/groups/{gid}/users/{uid}",
127134
response_model=Envelope[GroupUserGet],
135+
tags=_extra_tags,
128136
)
129137
async def update_group_user(
130138
_path: Annotated[GroupsUsersPathParams, Depends()],
@@ -138,6 +146,7 @@ async def update_group_user(
138146
@router.delete(
139147
"/groups/{gid}/users/{uid}",
140148
status_code=status.HTTP_204_NO_CONTENT,
149+
tags=_extra_tags,
141150
)
142151
async def delete_group_user(
143152
_path: Annotated[GroupsUsersPathParams, Depends()],
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
""" Helper script to generate OAS automatically
2+
"""
3+
4+
# pylint: disable=redefined-outer-name
5+
# pylint: disable=unused-argument
6+
# pylint: disable=unused-variable
7+
# pylint: disable=too-many-arguments
8+
9+
from typing import Annotated
10+
11+
from _common import as_query
12+
from fastapi import APIRouter, Depends
13+
from models_library.api_schemas_webserver.licensed_items_purchases import (
14+
LicensedItemPurchaseGet,
15+
)
16+
from models_library.generics import Envelope
17+
from models_library.rest_error import EnvelopedError
18+
from models_library.rest_pagination import Page
19+
from simcore_service_webserver._meta import API_VTAG
20+
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
21+
from simcore_service_webserver.licenses._licensed_items_checkouts_models import (
22+
LicensedItemCheckoutPathParams,
23+
LicensedItemsCheckoutsListQueryParams,
24+
)
25+
from simcore_service_webserver.wallets._handlers import WalletsPathParams
26+
27+
router = APIRouter(
28+
prefix=f"/{API_VTAG}",
29+
tags=[
30+
"licenses",
31+
],
32+
responses={
33+
i.status_code: {"model": EnvelopedError} for i in _TO_HTTP_ERROR_MAP.values()
34+
},
35+
)
36+
37+
38+
@router.get(
39+
"/wallets/{wallet_id}/licensed-items-checkouts",
40+
response_model=Page[LicensedItemPurchaseGet],
41+
tags=["wallets"],
42+
)
43+
async def list_licensed_item_checkouts_for_wallet(
44+
_path: Annotated[WalletsPathParams, Depends()],
45+
_query: Annotated[as_query(LicensedItemsCheckoutsListQueryParams), Depends()],
46+
):
47+
...
48+
49+
50+
@router.get(
51+
"/licensed-items-checkouts/{licensed_item_checkout_id}",
52+
response_model=Envelope[LicensedItemPurchaseGet],
53+
)
54+
async def get_licensed_item_checkout(
55+
_path: Annotated[LicensedItemCheckoutPathParams, Depends()],
56+
):
57+
...

0 commit comments

Comments
 (0)