Skip to content

Commit 99931a3

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 2025/upgrade/postgres
2 parents 006bb7d + 15d54a6 commit 99931a3

File tree

699 files changed

+18187
-10231
lines changed

Some content is hidden

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

699 files changed

+18187
-10231
lines changed

.env-devel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ LOGIN_ACCOUNT_DELETION_RETENTION_DAYS=31
334334
LOGIN_REGISTRATION_CONFIRMATION_REQUIRED=0
335335
LOGIN_REGISTRATION_INVITATION_REQUIRED=0
336336
PROJECTS_INACTIVITY_INTERVAL=00:00:20
337-
PROJECTS_TRASH_RETENTION_DAYS=7
338337
PROJECTS_MAX_COPY_SIZE_BYTES=30Gib
339338
PROJECTS_MAX_NUM_RUNNING_DYNAMIC_NODES=5
340339
REST_SWAGGER_API_DOC_ENABLED=1
@@ -353,6 +352,7 @@ TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT=http://jaeger:4318
353352
TRACING_OPENTELEMETRY_COLLECTOR_PORT=4318
354353
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE=100
355354
TRAEFIK_SIMCORE_ZONE=internal_simcore_stack
355+
TRASH_RETENTION_DAYS=7
356356
TWILIO_ACCOUNT_SID=DUMMY
357357
TWILIO_AUTH_TOKEN=DUMMY
358358
TWILIO_COUNTRY_CODES_W_ALPHANUMERIC_SID_SUPPORT=["41"]
@@ -371,6 +371,7 @@ WEBSERVER_GARBAGE_COLLECTOR=null
371371
WEBSERVER_GROUPS=1
372372
WEBSERVER_GUNICORN_CMD_ARGS=--timeout=180
373373
WEBSERVER_HOST=webserver
374+
WEBSERVER_LICENSES=true
374375
WEBSERVER_LOGIN={}
375376
WEBSERVER_LOGLEVEL=INFO
376377
WEBSERVER_META_MODELING=1

.github/dependabot.yml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ updates:
1111
- sanderegg
1212
assignees:
1313
- pcrespov
14+
- sanderegg
15+
labels:
16+
- t:maintenance
1417
ignore:
1518
- dependency-name: docker-compose
1619
versions:
@@ -26,32 +29,10 @@ updates:
2629
- dependency-name: httpx
2730
versions:
2831
- 0.17.0
29-
- package-ecosystem: pip
30-
directory: "/packages/service-library"
31-
schedule:
32-
interval: weekly
33-
time: "04:00"
34-
open-pull-requests-limit: 10
35-
reviewers:
36-
- pcrespov
37-
- sanderegg
38-
assignees:
39-
- pcrespov
40-
ignore:
4132
- dependency-name: openapi-core
4233
versions:
4334
- "> 0.12.0, < 1"
44-
- package-ecosystem: pip
45-
directory: "/packages/postgres-database"
46-
schedule:
47-
interval: weekly
48-
time: "04:00"
49-
open-pull-requests-limit: 10
50-
reviewers:
51-
- pcrespov
52-
- sanderegg
53-
assignees:
54-
- pcrespov
35+
5536
- package-ecosystem: "github-actions"
5637
directory: "/"
5738
schedule:
@@ -62,3 +43,5 @@ updates:
6243
- pcrespov
6344
assignees:
6445
- sanderegg
46+
labels:
47+
- t:maintenance

.github/mergify.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
queue_rules:
2+
- name: default
3+
queue_conditions: # condtions to be met to add the PR to the queue (manually or automatically)
4+
# general prerequisits fo accept the PR in the queue
5+
- label=🤖-automerge # let Mergify know that the PR can be merged (added manually)
6+
- label!=🤖-do-not-merge # block Mergify from merging the PR (added manually)
7+
- base=master
8+
- -draft # PR is not in draft state
9+
- -conflict # No merge conflicts
10+
11+
# Check for required reviews
12+
- "#approved-reviews-by>=2" # Requires 2 approving reviews
13+
- "#changes-requested-reviews-by=0" # No changes requested
14+
- "#review-threads-unresolved=0" # All review threads resolved
15+
16+
merge_conditions: # conditions to be met before being able to merge
17+
# list of CI checks that need to pass
18+
- check-success=system-test-environment-setup
19+
- check-success=changes
20+
- check-success=build-test-images
21+
- check-success=build-test-images-frontend
22+
- check-success=unit-tests
23+
- check-success=integration-tests
24+
- check-success=system-tests
25+
26+
27+
pull_request_rules:
28+
- name: retry flaky tests (when PR is approved)
29+
conditions:
30+
- label=🤖-automerge
31+
- label!=🤖-do-not-merge
32+
- base=master
33+
34+
- -draft # PR is not in draft state
35+
- -conflict # No merge conflicts
36+
- "#approved-reviews-by>=2" # Requires 2 approving reviews
37+
- "#changes-requested-reviews-by=0" # No changes requested
38+
- "#review-threads-unresolved=0" # All review threads resolved
39+
40+
- or:
41+
- check-failure=system-test-environment-setup
42+
- check-failure=changes
43+
- check-failure=build-test-images
44+
- check-failure=build-test-images-frontend
45+
- check-failure=unit-tests
46+
- check-failure=integration-tests
47+
- check-failure=system-tests
48+
actions:
49+
comment:
50+
message: "Restarted CI due to failing tests"
51+
github_actions:
52+
workflow:
53+
dispatch:
54+
- workflow: ci-testing-deploy.yml
55+
56+
- name: Automatically add PR to queue if it meets conditions
57+
conditions:
58+
- "label=🤖-automerge"
59+
- "label!=🤖-do-not-merge"
60+
- "base=master"
61+
62+
- "-draft" # PR is not in draft state
63+
- "-conflict" # PR has no conflicts
64+
- "#approved-reviews-by>=2" # Requires 2 approvals
65+
- "#changes-requested-reviews-by=0" # No requested changes
66+
- "#review-threads-unresolved=0" # All review threads resolved
67+
actions:
68+
queue:
69+
name: default

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,15 +1730,13 @@ jobs:
17301730
matrix:
17311731
python: ["3.11"]
17321732
os: [ubuntu-22.04]
1733-
docker_buildx: [v0.10.4]
17341733
fail-fast: false
17351734
steps:
17361735
- uses: actions/checkout@v4
17371736
- name: setup docker buildx
17381737
id: buildx
17391738
uses: docker/setup-buildx-action@v3
17401739
with:
1741-
version: ${{ matrix.docker_buildx }}
17421740
driver: docker-container
17431741
- name: setup python environment
17441742
uses: actions/setup-python@v5

.ruff.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
select = [
2+
lint.select = [
33
"A", # [https://pypi.org/project/flake8-builtins/]
44
"ARG", # [https://pypi.org/project/flake8-unused-arguments/]
55
"ASYNC", # [https://pypi.org/project/flake8-async/]
@@ -40,7 +40,7 @@ select = [
4040
"W", # [https://pypi.org/project/pycodestyle/] warnings
4141
"YTT", # [https://pypi.org/project/flake8-2020/]
4242
]
43-
ignore = [
43+
lint.ignore = [
4444
"E501", # line too long, handled by black
4545
"S101", # use of `assert` detected hanbled by pylance, does not support noseq
4646
"TID252", # [*] Relative imports from parent modules are banned
@@ -50,7 +50,7 @@ ignore = [
5050
target-version = "py311"
5151

5252

53-
[per-file-ignores]
53+
[lint.per-file-ignores]
5454
"**/{tests,pytest_simcore}/**" = [
5555
"T201", # print found
5656
"ARG001", # unused function argument
@@ -64,10 +64,10 @@ target-version = "py311"
6464
"FBT001", # Boolean positional arg in function definition
6565
]
6666

67-
[flake8-pytest-style]
67+
[lint.flake8-pytest-style]
6868
fixture-parentheses = false
6969
parametrize-names-type = "csv"
7070

7171

72-
[pylint]
72+
[lint.pylint]
7373
max-args = 10

api/specs/web-server/_folders.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
from models_library.generics import Envelope
2020
from models_library.rest_error import EnvelopedError
2121
from simcore_service_webserver._meta import API_VTAG
22-
from simcore_service_webserver.folders._exceptions_handlers import _TO_HTTP_ERROR_MAP
23-
from simcore_service_webserver.folders._models import (
22+
from simcore_service_webserver.folders._common.exceptions_handlers import (
23+
_TO_HTTP_ERROR_MAP,
24+
)
25+
from simcore_service_webserver.folders._common.models import (
2426
FolderSearchQueryParams,
2527
FoldersListQueryParams,
2628
FoldersPathParams,
27-
)
28-
from simcore_service_webserver.folders._workspaces_handlers import (
29-
_FolderWorkspacesPathParams,
29+
FolderWorkspacesPathParams,
3030
)
3131

3232
router = APIRouter(
@@ -109,6 +109,6 @@ async def delete_folder(
109109
tags=["workspaces"],
110110
)
111111
async def move_folder_to_workspace(
112-
_path: Annotated[_FolderWorkspacesPathParams, Depends()],
112+
_path: Annotated[FolderWorkspacesPathParams, Depends()],
113113
):
114114
...

api/specs/web-server/_licensed_items.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010

1111
from _common import as_query
1212
from fastapi import APIRouter, Depends, status
13-
from models_library.api_schemas_webserver.licensed_items import LicensedItemGet
13+
from models_library.api_schemas_webserver.licensed_items import LicensedItemRestGet
1414
from models_library.generics import Envelope
1515
from models_library.rest_error import EnvelopedError
16+
from models_library.rest_pagination import Page
1617
from simcore_service_webserver._meta import API_VTAG
17-
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
18-
from simcore_service_webserver.licenses._models import (
18+
from simcore_service_webserver.licenses._common.exceptions_handlers import (
19+
_TO_HTTP_ERROR_MAP,
20+
)
21+
from simcore_service_webserver.licenses._common.models import (
1922
LicensedItemsBodyParams,
2023
LicensedItemsListQueryParams,
2124
LicensedItemsPathParams,
@@ -35,7 +38,7 @@
3538

3639
@router.get(
3740
"/catalog/licensed-items",
38-
response_model=Envelope[list[LicensedItemGet]],
41+
response_model=Page[LicensedItemRestGet],
3942
)
4043
async def list_licensed_items(
4144
_query: Annotated[as_query(LicensedItemsListQueryParams), Depends()],
@@ -45,7 +48,7 @@ async def list_licensed_items(
4548

4649
@router.get(
4750
"/catalog/licensed-items/{licensed_item_id}",
48-
response_model=Envelope[LicensedItemGet],
51+
response_model=Envelope[LicensedItemRestGet],
4952
)
5053
async def get_licensed_item(
5154
_path: Annotated[LicensedItemsPathParams, Depends()],

api/specs/web-server/_licensed_items_checkouts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
from models_library.rest_error import EnvelopedError
1818
from models_library.rest_pagination import Page
1919
from simcore_service_webserver._meta import API_VTAG
20-
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
20+
from simcore_service_webserver.licenses._common.exceptions_handlers import (
21+
_TO_HTTP_ERROR_MAP,
22+
)
2123
from simcore_service_webserver.licenses._licensed_items_checkouts_models import (
2224
LicensedItemCheckoutPathParams,
2325
LicensedItemsCheckoutsListQueryParams,

api/specs/web-server/_licensed_items_purchases.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
from models_library.rest_error import EnvelopedError
1818
from models_library.rest_pagination import Page
1919
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._models import (
20+
from simcore_service_webserver.licenses._common.exceptions_handlers import (
21+
_TO_HTTP_ERROR_MAP,
22+
)
23+
from simcore_service_webserver.licenses._common.models import (
2224
LicensedItemsPurchasesListQueryParams,
2325
LicensedItemsPurchasesPathParams,
2426
)

api/specs/web-server/_projects_wallet.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,20 @@
88
# pylint: disable=unused-variable
99
# pylint: disable=too-many-arguments
1010

11+
from typing import Annotated
1112

1213
from _common import assert_handler_signature_against_model
13-
from fastapi import APIRouter
14+
from fastapi import APIRouter, Depends, status
1415
from models_library.api_schemas_webserver.wallets import WalletGet
1516
from models_library.generics import Envelope
1617
from models_library.projects import ProjectID
1718
from models_library.wallets import WalletID
1819
from simcore_service_webserver._meta import API_VTAG
1920
from simcore_service_webserver.projects._common.models import ProjectPathParams
21+
from simcore_service_webserver.projects._wallets_handlers import (
22+
_PayProjectDebtBody,
23+
_ProjectWalletPathParams,
24+
)
2025

2126
router = APIRouter(
2227
prefix=f"/{API_VTAG}",
@@ -51,3 +56,17 @@ async def connect_wallet_to_project(
5156

5257

5358
assert_handler_signature_against_model(connect_wallet_to_project, ProjectPathParams)
59+
60+
61+
@router.post(
62+
"/projects/{project_id}/wallet/{wallet_id}:pay-debt",
63+
status_code=status.HTTP_204_NO_CONTENT,
64+
)
65+
async def pay_project_debt(
66+
_path: Annotated[_ProjectWalletPathParams, Depends()],
67+
_body: Annotated[_PayProjectDebtBody, Depends()],
68+
):
69+
...
70+
71+
72+
assert_handler_signature_against_model(connect_wallet_to_project, ProjectPathParams)

0 commit comments

Comments
 (0)