Skip to content

Conversation

@wvangeit
Copy link
Contributor

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

@wvangeit wvangeit added this to the Bazinga! milestone May 16, 2025
@wvangeit wvangeit self-assigned this May 16, 2025
@wvangeit wvangeit added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs a:api framework api, data schemas, a:apiserver api-server service Feedback Meta-modeling 🤖-do-not-merge (optional) blocks Mergify from merging the PR labels May 16, 2025
@wvangeit wvangeit requested a review from bisgaard-itis May 16, 2025 13:32
@wvangeit wvangeit changed the title Add functions rest api inside webserver ✨ ♻️ Add functions rest api inside webserver (dontmerge) ✨ ♻️ May 16, 2025
@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 90.25974% with 15 lines in your changes missing coverage. Please review.

Project coverage is 87.34%. Comparing base (c4a6124) to head (e814088).
Report is 1 commits behind head on master.

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     
Flag Coverage Δ
integrationtests 64.43% <63.70%> (+0.06%) ⬆️
unittests 86.51% <90.25%> (-0.21%) ⬇️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 93.08% <100.00%> (+0.01%) ⬆️
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 72.36% <0.00%> (ø)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 84.95% <ø> (+0.05%) ⬆️
agent 96.46% <ø> (ø)
api_server 91.59% <100.00%> (-0.09%) ⬇️
autoscaling 96.07% <ø> (ø)
catalog 92.70% <ø> (ø)
clusters_keeper 99.25% <ø> (ø)
dask_sidecar 91.67% <ø> (+0.22%) ⬆️
datcore_adapter 98.12% <ø> (ø)
director 76.78% <ø> (ø)
director_v2 91.04% <ø> (-0.03%) ⬇️
dynamic_scheduler 96.76% <ø> (ø)
dynamic_sidecar 90.18% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.63% <ø> (ø)
resource_usage_tracker 89.02% <ø> (+0.10%) ⬆️
storage 87.67% <ø> (+0.10%) ⬆️
webclient ∅ <ø> (∅)
webserver 85.63% <88.70%> (-0.20%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4a6124...e814088. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@odeimaiz
Copy link
Member

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.

Copy link
Member

@sanderegg sanderegg left a 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.

Copy link
Member

@pcrespov pcrespov left a 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! :-)

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@GitHK GitHK left a 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.

@wvangeit wvangeit requested a review from sanderegg May 19, 2025 08:59
@wvangeit
Copy link
Contributor Author

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented May 19, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 3c12ac2

@wvangeit wvangeit added the 🤖-automerge marks PR as ready to be merged for Mergify label May 19, 2025
Copy link
Member

@sanderegg sanderegg left a 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!

@sonarqubecloud
Copy link

@mergify mergify bot merged commit 3c12ac2 into ITISFoundation:master May 20, 2025
96 checks passed
@wvangeit wvangeit deleted the add_wbserver_functions_rest branch May 20, 2025 09:19
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:api framework api, data schemas, a:apiserver api-server service a:webserver webserver's codebase. Assigning the area is particularly useful for bugs Feedback Meta-modeling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants