ITISFoundation / osparc-simcore

🐼 osparc-simcore simulation framework
https://osparc.io
MIT License
43 stars 27 forks source link

✨ Registers `OSPARC_VARIABLE_API_*` as osparc session variable (🚨) #5858

Closed pcrespov closed 4 months ago

pcrespov commented 4 months ago

What do these changes do?

Any service spawned by the director-v2 (both computational and dynamic) will now have access to OSPARC_VARIABLE_API_* session variables auto-generated per user and product. Note that this api-key will not be renewed everytime until https://github.com/ITISFoundation/osparc-simcore/issues/5875 is in place. In the meantime, the user has the possibility to delete it in the UI.

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --help Show this message and exit.

$ simcore-service osparc-variables OSPARC_VARIABLE_API_HOST OSPARC_VARIABLE_API_KEY OSPARC_VARIABLE_API_SECRET OSPARC_VARIABLE_NODE_ID OSPARC_VARIABLE_PRODUCT_NAME OSPARC_VARIABLE_STUDY_UUID OSPARC_VARIABLE_USER_EMAIL OSPARC_VARIABLE_USER_ID OSPARC_VARIABLE_USER_ROLE



## Related issue/s

- Resolves https://github.com/ITISFoundation/osparc-simcore/issues/5853
- Resolves https://github.com/ITISFoundation/osparc-simcore/issues/5397

## How to test

Driving tests `services/director-v2/tests/unit/test_utils_osparc_variables.py` and `services/director-v2/tests/unit/test_modules_api_keys_manager.py`

## Dev-ops checklist

- [x] 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))
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 67.50000% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 76.3%. Comparing base (cafbf96) to head (5a0bb1f). Report is 230 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858/graphs/tree.svg?width=650&height=150&src=pr&token=h1rOE8q7ic&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation)](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) ```diff @@ Coverage Diff @@ ## master #5858 +/- ## ======================================== - Coverage 84.5% 76.3% -8.3% ======================================== Files 10 154 +144 Lines 214 8594 +8380 Branches 25 205 +180 ======================================== + Hits 181 6562 +6381 - Misses 23 1981 +1958 - Partials 10 51 +41 ``` | [Flag](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | Coverage Δ | | |---|---|---| | [integrationtests](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | `76.3% <67.5%> (?)` | | | [unittests](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | Coverage Δ | | |---|---|---| | [...rc/simcore\_service\_director\_v2/core/application.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fcore%2Fapplication.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9jb3JlL2FwcGxpY2F0aW9uLnB5) | `95.1% <100.0%> (ø)` | | | [...v2/modules/dynamic\_sidecar/docker\_compose\_specs.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fdynamic_sidecar%2Fdocker_compose_specs.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL2R5bmFtaWNfc2lkZWNhci9kb2NrZXJfY29tcG9zZV9zcGVjcy5weQ==) | `92.9% <100.0%> (ø)` | | | [...c\_sidecar/scheduler/\_core/\_events\_user\_services.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fdynamic_sidecar%2Fscheduler%2F_core%2F_events_user_services.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL2R5bmFtaWNfc2lkZWNhci9zY2hlZHVsZXIvX2NvcmUvX2V2ZW50c191c2VyX3NlcnZpY2VzLnB5) | `87.8% <ø> (ø)` | | | [...s/dynamic\_sidecar/scheduler/\_core/\_events\_utils.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fdynamic_sidecar%2Fscheduler%2F_core%2F_events_utils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL2R5bmFtaWNfc2lkZWNhci9zY2hlZHVsZXIvX2NvcmUvX2V2ZW50c191dGlscy5weQ==) | `91.5% <100.0%> (ø)` | | | [...e\_director\_v2/modules/osparc\_variables/\_\_init\_\_.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fosparc_variables%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL29zcGFyY192YXJpYWJsZXMvX19pbml0X18ucHk=) | `100.0% <100.0%> (ø)` | | | [...r-v2/src/simcore\_service\_director\_v2/utils/dask.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Futils%2Fdask.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi91dGlscy9kYXNrLnB5) | `77.7% <100.0%> (ø)` | | | [...vice\_director\_v2/modules/osparc\_variables/\_user.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fosparc_variables%2F_user.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL29zcGFyY192YXJpYWJsZXMvX3VzZXIucHk=) | `58.3% <58.3%> (ø)` | | | [...v2/src/simcore\_service\_director\_v2/cli/\_\_init\_\_.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fcli%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9jbGkvX19pbml0X18ucHk=) | `0.0% <0.0%> (ø)` | | | [...ector\_v2/modules/osparc\_variables/\_api\_auth\_rpc.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fosparc_variables%2F_api_auth_rpc.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL29zcGFyY192YXJpYWJsZXMvX2FwaV9hdXRoX3JwYy5weQ==) | `61.9% <61.9%> (ø)` | | | [...ector\_v2/modules/osparc\_variables/substitutions.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree&filepath=services%2Fdirector-v2%2Fsrc%2Fsimcore_service_director_v2%2Fmodules%2Fosparc_variables%2Fsubstitutions.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvZGlyZWN0b3ItdjIvc3JjL3NpbWNvcmVfc2VydmljZV9kaXJlY3Rvcl92Mi9tb2R1bGVzL29zcGFyY192YXJpYWJsZXMvc3Vic3RpdHV0aW9ucy5weQ==) | `60.4% <79.4%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | | ... and [152 files with indirect coverage changes](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5858/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation)
mrnicegyu11 commented 4 months ago

ack! thanks

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.2% Duplication on New Code

See analysis details on SonarCloud