Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Mar 10, 2025

What do these changes do?

This PR is part of the ongoing refactoring effort within the webserver.

Following discussions with @bisgaard-itis, it aligns certain conventions in catalog and api_keys to be consistent with the patterns established in the refactored domains.

This PR refactors and renames various files and imports within the simcore_service_webserver.catalog and simcore_service_webserver.api_keys modules. Specific changes include renaming _exceptions_handlers to _controller_rest_exceptions, consolidating schemas into _controller_rest_schemas, and updating pagination parameters. Additionally, new routes were added for managing service tags.

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv tests --cov=simcore_service_webserver --cov-config=/home/crespo/repos/osparc-simcore/.coveragerc  tests/unit/**/*catalog*.py

Dev-ops

None

@pcrespov pcrespov self-assigned this Mar 10, 2025
@codecov
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 85.91549% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.64%. Comparing base (60f74ff) to head (6f6db36).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7334      +/-   ##
==========================================
+ Coverage   87.35%   88.64%   +1.29%     
==========================================
  Files        1704     1370     -334     
  Lines       66217    56744    -9473     
  Branches     1123      481     -642     
==========================================
- Hits        57844    50303    -7541     
+ Misses       8053     6309    -1744     
+ Partials      320      132     -188     
Flag Coverage Δ
integrationtests 65.34% <69.11%> (+<0.01%) ⬆️
unittests 87.69% <85.91%> (+1.17%) ⬆️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.72% <100.00%> (ø)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.03% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.46% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 90.68% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 92.12% <ø> (ø)
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.25% <ø> (ø)
datcore_adapter 98.11% <ø> (ø)
director 76.59% <ø> (-0.10%) ⬇️
director_v2 91.30% <ø> (ø)
dynamic_scheduler 97.33% <ø> (ø)
dynamic_sidecar 90.07% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.22% <ø> (+0.10%) ⬆️
storage 85.49% <ø> (-0.13%) ⬇️
webclient ∅ <ø> (∅)
webserver 85.79% <85.29%> (+<0.01%) ⬆️

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 60f74ff...6f6db36. 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.

@pcrespov pcrespov force-pushed the mai/webserve-refactoring branch from a14e840 to c4e29ee Compare March 10, 2025 15:21
@pcrespov pcrespov changed the title WIP: ♻️ Mai/webserve refactoring ♻️ webserver: catalog & api_keys module renaming Mar 10, 2025
@pcrespov pcrespov added this to the The Awakening milestone Mar 10, 2025
@pcrespov pcrespov force-pushed the mai/webserve-refactoring branch from 9e8557e to 96144b5 Compare March 10, 2025 21:21
@pcrespov pcrespov marked this pull request as ready for review March 10, 2025 21:21
@pcrespov pcrespov requested a review from bisgaard-itis March 10, 2025 21:21
@pcrespov pcrespov added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs t:maintenance Some planned maintenance work labels Mar 10, 2025
@pcrespov pcrespov changed the title ♻️ webserver: catalog & api_keys module renaming ♻️ webserver: catalog & api_keys renaming of modules Mar 10, 2025
@pcrespov pcrespov enabled auto-merge (squash) March 10, 2025 21:24
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.

I wonder how people managed to use controller to describe the API entrypoints when there was a well known pattern where the controller is the logics part. anyway. just names but still very bad choosing.

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.

Thanks a lot Pedro 🤙
I will follow up with the changes we discussed.

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.

👍

Copy link
Contributor

@giancarloromeo giancarloromeo left a comment

Choose a reason for hiding this comment

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

Good.

Only one thing: module names are getting longer and longer (like German words). What about using packages (e.g. controllers/rest instead of controller_rest)?

@pcrespov
Copy link
Member Author

Good.

Only one thing: module names are getting longer and longer (like German words). What about using packages (e.g. controllers/rest instead of controller_rest)?

noted.

@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit 6c9b15a into ITISFoundation:master Mar 11, 2025
95 checks passed
@pcrespov pcrespov deleted the mai/webserve-refactoring branch March 11, 2025 15:03
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Mar 26, 2025
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Apr 15, 2025
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:webserver webserver's codebase. Assigning the area is particularly useful for bugs t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants