-
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
✨ Webserver reports copy progress #3287
✨ Webserver reports copy progress #3287
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3287 +/- ##
======================================
Coverage 76.2% 76.2%
======================================
Files 321 321
Lines 10863 10863
Branches 1541 1541
======================================
Hits 8288 8288
Misses 2367 2367
Partials 208 208
Flags with carried forward coverage won't be shown. Click here to find out more. |
de5c04f
to
8518652
Compare
6a76b75
to
1fc28e5
Compare
6dc29c0
to
e0edfb3
Compare
2ee04e6
to
434c5fb
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.
Very nice, I've appreciated the long running tasks interface.
services/web/server/src/simcore_service_webserver/projects/projects_handlers_crud.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/projects_handlers_crud.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.
Excellent work.
Some minor comments and one request: can we limit the digits in the progress to at most 3 ? e.g. for a progress between 0 - 1, I find a bit strange to have to deal with the digits that are not highlighted 0.051234567899
@@ -4985,7 +4985,7 @@ paths: | |||
content: | |||
application/json: | |||
schema: | |||
$ref: '#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/put/responses/200/content/application~1json/schema' | |||
$ref: '#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/get/responses/200/content/application~1json/schema' |
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.
curious that the generator takes now the get
instead of the put
path to find the schema. I guess this has to do with the version issue we saw some days ago.
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'll regenerate it again at the office to be sure...
new_project, new_project["uuid"], hidden=False | ||
) | ||
starting_value = task_progress.percent | ||
async for long_running_task in copy_data_folders_from_project( |
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.
Just to see if i understood: here you are connecting two long-running tasks
So this mean that the webserver waits (i.e. polls storage until tasks is completed) until the all the data is fully copied. since this coroutine is awaited within create_project
. Then the webserver handler for CREATE project is built as a long running task as well.
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 2 long running tasks are connected here.
technically the create_project was already waiting for storage to complete. The long running task allows:
- no super large request anymore (the request can spend several minutes)
- it is potentially possible to retry in case of network issue (retrials, this is not yet the case in the frontend, but the client does retry on connection lost (60 seconds)
- progress reporting is now possible (and is implemented as such)
- potentially could also return faster if the request completed fast (not implemented)
42dbfa4
to
c2955a0
Compare
This reverts commit e2e365b.
c2955a0
to
a83b282
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@elisabettai : the frontend was improved regarding retries as well in #3326 |
What do these changes do?
webserver micro-service
POST /projects
now reports progress of copy as % and gives info on how much data was already copied in its messagestorage micro-service
POST /{api_vtag}/simcore-s3/folders
to a long running task (e.g. Accepted, get status, get result)@odeimaiz : this will need your 🪄 here
Related issue/s
NOTE: first #3290 must go in
How to test
Checklist