-
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
✨ long running creation of studies #3235
✨ long running creation of studies #3235
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3235 +/- ##
========================================
+ Coverage 82.3% 84.3% +1.9%
========================================
Files 752 548 -204
Lines 32119 26005 -6114
Branches 4110 3422 -688
========================================
- Hits 26454 21924 -4530
+ Misses 4829 3388 -1441
+ Partials 836 693 -143
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f07f028
to
55dc8d3
Compare
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.
Looking nice, please find some questions below.
services/web/server/src/simcore_service_webserver/projects/projects_handlers_crud.py
Show resolved
Hide resolved
@pytest.mark.skip( | ||
reason="since long running tasks are now used for copying, this is no longer an issue." | ||
"If the timeout is really super short, then the background task should be properly cancelled." | ||
"this should be tested 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.
Question: why keep the test if no longer required, or did I misunderstand the above message?
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.
yes, I had forgotten that one. I need to adapt the test.
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.
👍 It's fine with me.
packages/service-library/src/servicelib/aiohttp/long_running_tasks/_routes.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/modules/webserver.py
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed!
|
What do these changes do?
This PR leverages the new framework for long running REST calls when creating new study in oSparc.
Until now the creation of a study (and its copy with or without data) were done by the webclient calling
POST /projects
on the webserver. The latter would create a new study, maybe copy data and return a 201 code.This is now changed to
POST /projects
with same query parametersGET /tasks/{task_id}
to find out when the creation completedGET /tasks/{task_id}/result
, server will return a 201 code.needs #3260
NOTE: this does not handle yet the use case where the webclient is refreshed (via F5) as the new client will not "recover" its current running tasks. In this case if there is copying involved and it is large, then it will still continue in the background without feedback. The new study might appear at some point.
NOTE: this does not handle the use case where the webserver is restarted in the middle of the task. the task is then lost.
Related issue/s
help with ITISFoundation/osparc-issues#558
How to test
Checklist