-
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
✨ allows frontend to check if a project is inactive #4895
✨ allows frontend to check if a project is inactive #4895
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4895 +/- ##
========================================
+ Coverage 86.7% 87.2% +0.5%
========================================
Files 1154 1008 -146
Lines 48937 45097 -3840
Branches 1065 533 -532
========================================
- Hits 42443 39339 -3104
+ Misses 6259 5639 -620
+ Partials 235 119 -116
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
here are some initial comments. there are a few questions. One of them being:
- you stop the whole project not service by service? why is that?
packages/models-library/src/models_library/api_schemas_dynamic_sidecar/containers.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/api/routes/dynamic_services.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.
I think I got the general concept, but maybe you can explain me a bit more in person.
So the frontend will be polling for this information? Sim4life will also integrate and use this? If any of the services in the project is active nothing will be done? If all the services will be inactive for 30 minutes, we will close the project?
@matusdrobuliak66 you got it right. I've updated the description of the PR with some background information on how this will be used. Hope it's better now. |
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. I added some suggestions.
packages/models-library/src/models_library/api_schemas_dynamic_sidecar/containers.py
Outdated
Show resolved
Hide resolved
...es/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/api_client/_public.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers.py
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.
thanks for the changes!
…rc-simcore-forked into pr-osparc-is-project-inactive
Code Climate has analyzed commit f0234fb and detected 0 issues on this pull request. View more on Code Climate. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What do these changes do?
Background on the feature:
inactive
Changes:
webserver
exposesGET /v0/projects/{project_id}/inactivity
which provides information whether the project should be considered inactive or notdirector-v2
exposesGET /v2/dynamic_services/projects/{project_id}/inactivity
to retrieve the project inactivitydynamic-sidecar
exposesGET /v1/containers/inactivity
which provides information about the service's inactivitycallbacks-mapping
adding support for theinactivity
command which will be called to determine if a service is inactive.jupyter-math
now supports this interface Expose service inactivity jupyter-math#24 @mguidon @elisabettai have a look at how to add thisuserInactivityThreshold
defaults to30 minutes
Using it in your service
The service reply should replay with a json object and it will be validated by
InactivityResponse
.NOTE versions starting from
itisfoundation/ci-service-integration-library:v1.0.3-dev-8
and up support this featureHow to extend the
runtime.yml
file:NOTE:
timeout
has to be comprised between 1 and 5 seconds, validation of the inactivity field will fail otherwiseRelated issue/s
How to test
DevOps Checklist