-
Notifications
You must be signed in to change notification settings - Fork 32
Add functions rest api inside webserver ✨ ♻️ #7693
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
Add functions rest api inside webserver ✨ ♻️ #7693
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7693 +/- ##
==========================================
- Coverage 87.51% 87.34% -0.17%
==========================================
Files 1816 1644 -172
Lines 70506 66588 -3918
Branches 1144 904 -240
==========================================
- Hits 61701 58161 -3540
+ Misses 8493 8180 -313
+ Partials 312 247 -65
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
I was told that, in this first round, only creation of functions was required... so, for now, there won't be any frontend on the osparc side for deleting or listing (but I'm sure it will come soon). Please test it as shown in here. |
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.
wait for merge intent... just re-ask for review when ready.
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 left you some tips (mostly of tooling we have) and minor comments to improve error handling. Some of them we can check offline.
You also need to rebuild the openapi specs for the webserver. For the moment we do that manually. Just go to the root folder and
make devenv
make openapi-specs
And should update the OAS for the webserver.
Otherwise, Alles Paletti! :-)
...web/server/src/simcore_service_webserver/functions/_controller/_functions_controller_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/functions_rpc/test_functions_controller_rest.py
Outdated
Show resolved
Hide resolved
...web/server/src/simcore_service_webserver/functions/_controller/_functions_controller_rest.py
Show resolved
Hide resolved
...web/server/src/simcore_service_webserver/functions/_controller/_functions_controller_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py
Show resolved
Hide resolved
…arc-simcore into add_wbserver_functions_rest
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.
lgtm
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.
Looks OK for me.
.../web/server/src/simcore_service_webserver/functions/_controller/_functions_controller_rpc.py
Show resolved
Hide resolved
…arc-simcore into pr/wvangeit/7693
|
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 3c12ac2 |
…arc-simcore into add_wbserver_functions_rest
…arc-simcore into add_wbserver_functions_rest
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.
the size goes down it's cool. thanks!
services/api-server/src/simcore_service_api_server/api/routes/functions_routes.py
Show resolved
Hide resolved
|



What do these changes do?
This adds functions to the rest api of the webserver, so that i can be accessed by the frontend.
At the moment it's limited to register_function, get_function and delete_function.
I also refactored the model locations based on PC's request, and added a service layer.
@odeimaiz / @pcrespov please let me know if this implementation makes sense. Then I will implement also the other endpoints that already exist in the apiserver.
How to test
Run the unit tests of the webserver
Access the rest api from the webserver
Dev-ops
No env changes