Skip to content

Commit dc8ef21

Browse files
author
Andrei Neagu
committed
Merge remote-tracking branch 'upstream/master' into pr-osparc-resilient-long-running-jobs
2 parents e9b3bcc + a21d245 commit dc8ef21

File tree

1,560 files changed

+58530
-22882
lines changed

Some content is hidden

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

1,560 files changed

+58530
-22882
lines changed

.codecov.yml

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

1919
component_management:
2020
default_rules:
21-
carryforward: true
2221
statuses:
2322
- type: project
2423
target: auto

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ branch = True
33
omit =
44
*/tests/*
55
*/generated_code/*
6+
*/_original_fastapi_encoders.py
67
parallel = True
78

89
[report]

.env-devel

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ CATALOG_SERVICES_DEFAULT_RESOURCES='{"CPU": {"limit": 0.1, "reservation": 0.1},
4949
CATALOG_SERVICES_DEFAULT_SPECIFICATIONS='{}'
5050
CATALOG_TRACING=null
5151

52+
CELERY_RESULT_EXPIRES=P7D
53+
5254
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"}'
5355
CLUSTERS_KEEPER_COMPUTATIONAL_BACKEND_DOCKER_IMAGE_TAG=master-github-latest
5456
CLUSTERS_KEEPER_DASK_NTHREADS=0
@@ -84,10 +86,10 @@ DIRECTOR_SERVICES_CUSTOM_CONSTRAINTS=null
8486
DIRECTOR_TRACING=null
8587

8688
DOCKER_API_PROXY_HOST=docker-api-proxy
87-
DOCKER_API_PROXY_PASSWORD=null
89+
DOCKER_API_PROXY_PASSWORD=admin
8890
DOCKER_API_PROXY_PORT=8888
8991
DOCKER_API_PROXY_SECURE=False
90-
DOCKER_API_PROXY_USER=null
92+
DOCKER_API_PROXY_USER=admin
9193

9294
EFS_USER_ID=8006
9395
EFS_USER_NAME=efs
@@ -130,7 +132,7 @@ DYNAMIC_SIDECAR_API_SAVE_RESTORE_STATE_TIMEOUT=01:00:00
130132
DIRECTOR_V2_TRACING=null
131133

132134
# DYNAMIC_SCHEDULER ----
133-
DYNAMIC_SCHEDULER_LOGLEVEL=DEBUG
135+
DYNAMIC_SCHEDULER_LOGLEVEL=INFO
134136
DYNAMIC_SCHEDULER_PROFILING=1
135137
DYNAMIC_SCHEDULER_USE_INTERNAL_SCHEDULER=0
136138
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=01:00:00
@@ -162,6 +164,9 @@ INVITATIONS_TRACING=null
162164
LOG_FORMAT_LOCAL_DEV_ENABLED=1
163165
LOG_FILTER_MAPPING='{}'
164166

167+
NOTIFICATIONS_LOGLEVEL=INFO
168+
NOTIFICATIONS_TRACING=null
169+
165170
PAYMENTS_ACCESS_TOKEN_EXPIRE_MINUTES=30
166171
PAYMENTS_ACCESS_TOKEN_SECRET_KEY=2c0411810565e063309be1457009fb39ce023946f6a354e6935107b57676
167172
PAYMENTS_AUTORECHARGE_DEFAULT_MONTHLY_LIMIT=10000
@@ -250,8 +255,6 @@ SMTP_PROTOCOL=UNENCRYPTED
250255
SMTP_USERNAME=it_doesnt_matter
251256

252257
# STORAGE ----
253-
BF_API_KEY=none
254-
BF_API_SECRET=none
255258
STORAGE_ENDPOINT=storage:8080
256259
STORAGE_HOST=storage
257260
STORAGE_LOGLEVEL=INFO

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ Makefile @pcrespov @sanderegg
2929
/services/clusters-keeper/ @sanderegg
3030
/services/datcore-adapter/ @sanderegg
3131
/services/director*/ @sanderegg @pcrespov @GitHK
32-
/services/docker-compose*.yml @sanderegg @mrnicegyu11 @YuryHrytsuk
32+
/services/docker-compose.yml @sanderegg @mrnicegyu11 @YuryHrytsuk
33+
/services/docker-compose.*.yml @sanderegg
3334
/services/dynamic-sidecar/ @GitHK
3435
/services/efs-guardian/ @matusdrobuliak66
3536
/services/invitations/ @pcrespov
3637
/services/migration/ @pcrespov
38+
/services/notifications/ @GitHK
3739
/services/payments/ @pcrespov @matusdrobuliak66
3840
/services/resource-usage-tracker/ @matusdrobuliak66
3941
/services/static-webserver/ @GitHK
4042
/services/static-webserver/client/ @odeimaiz
4143
/services/storage/ @sanderegg
44+
/services/storage/modules/celery @giancarloromeo
4245
/services/web/server/ @pcrespov @sanderegg @GitHK @matusdrobuliak66
4346
/tests/e2e-frontend/ @odeimaiz
4447
/tests/e2e-playwright/ @matusdrobuliak66

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
⬆️ Upgrade dependencies.
1111
📝 Add or update documentation.
1212
🔨 Add or update development scripts.
13+
✅ Add, update or pass tests.
1314
🔒️ Fix security issues.
1415
⚠️ Changes in ops configuration etc. are required before deploying.
1516
[ Please add a link to the associated ops-issue or PR, such as in https://github.com/ITISFoundation/osparc-ops-environments or https://git.speag.com/oSparc/osparc-infra ]
@@ -28,32 +29,16 @@ or from https://gitmoji.dev/
2829

2930

3031
## Related issue/s
31-
32-
<!-- Link pull request to an issue
33-
SEE https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
34-
35-
- resolves ITISFoundation/osparc-issues#428
36-
- fixes #26
37-
-->
32+
<!-- LINK to other issues and add prefix `closes`, `fixes`, `resolves`-->
3833

3934

4035
## How to test
4136

4237
<!-- Give REVIEWERS some hits or code snippets on how could this be tested -->
4338

44-
## Dev-ops checklist
45-
46-
- [ ] No ENV changes or I properly updated ENV ([read the instruction](https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/blob/configs/README.md?ref_type=heads#how-to-update-env-variables))
47-
48-
<!-- Some checks that might help your code run stable on production, and help devops assess criticality.
49-
Modified from https://oschvr.com/posts/what-id-like-as-sre/
39+
## Dev-ops
5040

51-
- How can DevOps check the health of the service ?
52-
- How can DevOps safely and gracefully restart the service ?
53-
- How and why would this code fail ?
54-
- What kind of metrics are you exposing ?
55-
- Is there any documentation/design specification for the service ?
56-
- How (e.g. through which loglines) can DevOps detect unexpected situations that require escalation to human ?
57-
- What are the resource limitations (CPU, RAM) expected for this service ?
58-
- Are all relevant variables documented and adjustable via environment variables (i.e. no hardcoded magic numbers) ?
41+
<!--
42+
- No changes /updated ENV. SEE https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/blob/configs/README.md?ref_type=heads#how-to-update-env-variables)
43+
- SEE docs/devops-checklist.md
5944
-->

.github/copilot-instructions.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# GitHub Copilot Instructions
2+
3+
This document provides guidelines and best practices for using GitHub Copilot in the `osparc-simcore` repository and other Python and Node.js projects.
4+
5+
## General Guidelines
6+
7+
1. **Use Python 3.11**: Ensure that all Python-related suggestions align with Python 3.11 features and syntax.
8+
2. **Node.js Compatibility**: For Node.js projects, ensure compatibility with the version specified in the project (e.g., Node.js 14 or later).
9+
3. **Follow Coding Conventions**: Adhere to the coding conventions outlined in the `docs/coding-conventions.md` file.
10+
4. **Test-Driven Development**: Write unit tests for all new functions and features. Use `pytest` for Python and appropriate testing frameworks for Node.js.
11+
5. **Environment Variables**: Use environment variables as specified in `docs/env-vars.md` for configuration. Avoid hardcoding sensitive information.
12+
6. **Documentation**: Prefer self-explanatory code; add documentation only if explicitly requested by the developer.
13+
14+
## Python-Specific Instructions
15+
16+
- Always use type hints and annotations to improve code clarity and compatibility with tools like `mypy`.
17+
- An exception to that rule is in `test_*` functions return type hint must not be added
18+
- Follow the dependency management practices outlined in `requirements/`.
19+
- Use `ruff` for code formatting and for linting.
20+
- Use `black` for code formatting and `pylint` for linting.
21+
- ensure we use `sqlalchemy` >2 compatible code.
22+
- ensure we use `pydantic` >2 compatible code.
23+
- ensure we use `fastapi` >0.100 compatible code
24+
- use f-string formatting
25+
- Only add comments in function if strictly necessary
26+
27+
28+
### Json serialization
29+
30+
- Generally use `json_dumps`/`json_loads` from `common_library.json_serialization` to built-in `json.dumps` / `json.loads`.
31+
- Prefer Pydantic model methods (e.g., `model.model_dump_json()`) for serialization.
32+
33+
34+
## Node.js-Specific Instructions
35+
36+
- Use ES6+ syntax and features.
37+
- Follow the `package.json` configuration for dependencies and scripts.
38+
- Use `eslint` for linting and `prettier` for code formatting.
39+
- Write modular and reusable code, adhering to the project's structure.
40+
41+
## Copilot Usage Tips
42+
43+
1. **Be Specific**: Provide clear and detailed prompts to Copilot for better suggestions.
44+
2. **Iterate**: Review and refine Copilot's suggestions to ensure they meet project standards.
45+
3. **Split Tasks**: Break down complex tasks into smaller, manageable parts for better suggestions.
46+
4. **Test Suggestions**: Always test Copilot-generated code to ensure it works as expected.
47+
48+
## Additional Resources
49+
50+
- [Python Coding Conventions](../docs/coding-conventions.md)
51+
- [Environment Variables Guide](../docs/env-vars.md)
52+
- [Steps to Upgrade Python](../docs/steps-to-upgrade-python.md)
53+
- [Node.js Installation Script](../scripts/install_nodejs_14.bash)

.github/mergify.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,3 @@ queue_rules:
1212
- "#approved-reviews-by>=2" # Requires 2 approving reviews
1313
- "#changes-requested-reviews-by=0" # No changes requested
1414
- "#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
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Reusable Build Images
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build-backend:
7+
required: true
8+
type: boolean
9+
description: "Whether backend images should be built"
10+
build-frontend:
11+
required: true
12+
type: boolean
13+
description: "Whether frontend images should be built"
14+
python-version:
15+
required: true
16+
type: string
17+
description: "Python version to use"
18+
os:
19+
required: true
20+
type: string
21+
description: "Runner OS to use"
22+
23+
jobs:
24+
build-test-images:
25+
timeout-minutes: 30
26+
runs-on: ${{ inputs.os }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: setup docker buildx
30+
id: buildx
31+
uses: docker/setup-buildx-action@v3
32+
with:
33+
driver: docker-container
34+
- name: expose github runtime for buildx
35+
uses: crazy-max/ghaction-github-runtime@v3
36+
- name: show system environs
37+
run: ./ci/helpers/show_system_versions.bash
38+
- name: build backend images
39+
if: ${{ inputs.build-backend }}
40+
run: |
41+
export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
42+
mkdir --parents /${{ runner.temp }}/build
43+
make build local-dest=/${{ runner.temp }}/build exclude=static-webserver
44+
- name: build frontend images
45+
if: ${{ inputs.build-frontend }}
46+
run: |
47+
export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
48+
mkdir --parents /${{ runner.temp }}/build
49+
make build local-dest=/${{ runner.temp }}/build target=static-webserver
50+
- name: upload backend artifacts
51+
if: ${{ inputs.build-backend }}
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: docker-buildx-images-${{ runner.os }}-${{ github.sha }}-backend
55+
path: /${{ runner.temp }}/build
56+
- name: upload frontend artifacts
57+
if: ${{ inputs.build-frontend }}
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: docker-buildx-images-${{ runner.os }}-${{ github.sha }}-frontend
61+
path: /${{ runner.temp }}/build

.github/workflows/ci-arm-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
os: [ubuntu-22.04]
22+
os: [ubuntu-24.04]
2323
python: ["3.11"]
2424
env:
2525
# secrets can be set in settings/secrets on github

.github/workflows/ci-multi-architecture-fusing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
os: [ubuntu-22.04]
23+
os: [ubuntu-24.04]
2424
python: ["3.11"]
2525
env:
2626
# secrets can be set in settings/secrets on github

0 commit comments

Comments
 (0)