-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎨 expose service_run_id
as an env var for both comp and new style dynamic services
#6942
base: master
Are you sure you want to change the base?
🎨 expose service_run_id
as an env var for both comp and new style dynamic services
#6942
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6942 +/- ##
==========================================
- Coverage 87.06% 85.32% -1.74%
==========================================
Files 1611 1394 -217
Lines 63621 58279 -5342
Branches 2026 1637 -389
==========================================
- Hits 55392 49729 -5663
- Misses 7895 8279 +384
+ Partials 334 271 -63
Continue to review full report in Codecov by Sentry.
|
…ser-services-to-request-dy-sidecar-run-id
…-id' of github.com:GitHK/osparc-simcore-forked into pr-osparc-allow-user-services-to-request-dy-sidecar-run-id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but wrong computational run id
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some comments
services/director-v2/src/simcore_service_director_v2/modules/dask_client.py
Outdated
Show resolved
Hide resolved
…ser-services-to-request-dy-sidecar-run-id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m fine with this unification 👍, but are we 100% sure that the concept of a run ID is the same in all three use cases: computation, dynamic, and resource usage tracker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me but please check my comments about the naming, and at least use import RunID as ServiceRunID in all the computational related modules in dv-2.
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_base.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_base.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_base.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/modules/dask_client.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/utils/dask.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please reassign back when unblocked. thx
…ser-services-to-request-dy-sidecar-run-id
service_run_id
as an env var for both comp and new style dynamic services
…ser-services-to-request-dy-sidecar-run-id
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
from .users import UserID | ||
|
||
if TYPE_CHECKING: | ||
from .projects import ProjectID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this this necessary? Is it because of cyclic dependencies?
TIP: For things like ProjectID
we can always move these to common_library
. I already did that with user_enums and groups_enums (check how it is imported in the Groups and Users models)
@@ -120,6 +121,7 @@ def create(cls, app: FastAPI): | |||
("OSPARC_VARIABLE_NODE_ID", "node_id"), | |||
("OSPARC_VARIABLE_PRODUCT_NAME", "product_name"), | |||
("OSPARC_VARIABLE_STUDY_UUID", "project_id"), | |||
("OSPARC_VARIABLE_SERVICE_RUN_ID", "run_id"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
TIP: did you know that now you can check the new registered osparc variable using the CLI?
$ cd services/director-v2
$ make install-dev
$ 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
@@ -44,12 +54,15 @@ class RunID(str): | |||
and old volumes for different runs. | |||
Avoids overwriting data that left dropped on the node (due to an error) | |||
and gives the osparc-agent an opportunity to back it up. | |||
The resource-usage-tracker tracker uses these RunIDs to keep track of | |||
resource usage from comp and dynamic services. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource usage from comp and dynamic services. | |
resource usage from computational and dynamic services. |
@@ -68,7 +92,7 @@ def __get_pydantic_core_schema__( | |||
return core_schema.no_info_after_validator_function(cls, handler(str)) | |||
|
|||
@classmethod | |||
def validate(cls, v: "RunID | str", _: ValidationInfo) -> "RunID": | |||
def validate(cls, v: "ServiceRunID | str", _: ValidationInfo) -> "ServiceRunID": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: should this not raise a ValueError instead of TypeError?
What do these changes do?
NOTE: this became very noisy due to a rename and unification of the names
The
${OSPARC_VARIABLE_SERVICE_RUN_ID}
will now be replaced in the compose spec with the actualservice_run_id
.The
service_run_id
must be exposed for both comp and dynamic services it's a requirement for some comp services.Bonus: unified
service_run_id
under one typeServiceRunID
shared by all servicesRelated issue/s
How to test
Dev-ops checklist