Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Feb 13, 2025

What do these changes do?

ReDoc

♻️ This PR refactors error handling in the projects domain.

Highlights

  • Standardizes exception handling across project REST handlers.
  • Introduces unified helper functions for enveloped responses via envelope_json_response.
  • Injects errors info in some of the projects rest entrypoint (this is still undecided since there are many errors in place and cannot distinguish e.g. 404 whether it is a folder or a project or a workspace or any other subresource of a project)

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv tests/unit/**/test_*project*.py

Dev-ops

None

@pcrespov pcrespov self-assigned this Feb 13, 2025
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Feb 13, 2025
@pcrespov pcrespov added this to the Singularity milestone Feb 13, 2025
@pcrespov pcrespov changed the title WIP: ♻️ Mai/project rest exception handlers WIP:♻️ Refactor webserver projects: rest exception handlers Feb 13, 2025
@pcrespov pcrespov added the a:webserver webserver's codebase. Assigning the area is particularly useful for bugs label Feb 13, 2025
@codecov
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 95.55556% with 6 lines in your changes missing coverage. Please review.

Project coverage is 83.49%. Comparing base (dbec189) to head (6252336).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7229      +/-   ##
==========================================
- Coverage   87.01%   83.49%   -3.52%     
==========================================
  Files        1676      656    -1020     
  Lines       64958    31396   -33562     
  Branches     1115      177     -938     
==========================================
- Hits        56523    26214   -30309     
+ Misses       8117     5120    -2997     
+ Partials      318       62     -256     
Flag Coverage Δ
integrationtests 65.47% <70.37%> (+0.19%) ⬆️
unittests 85.80% <95.55%> (-0.22%) ⬇️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 77.25% <ø> (-7.83%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.60% <ø> (-12.70%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 89.77% <ø> (ø)
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
osparc_gateway_server ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 84.86% <95.55%> (+0.06%) ⬆️

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 dbec189...6252336. Read the comment docs.

@pcrespov pcrespov force-pushed the mai/project-rest-exception-handlers branch 2 times, most recently from ae52afa to 8315bf3 Compare February 17, 2025 10:50
@pcrespov pcrespov changed the title WIP:♻️ Refactor webserver projects: rest exception handlers ♻️ Refactor webserver projects: rest exception handlers Feb 17, 2025
@pcrespov pcrespov marked this pull request as ready for review February 17, 2025 10:50
@pcrespov pcrespov force-pushed the mai/project-rest-exception-handlers branch from 99e37bd to bbb0adb Compare February 17, 2025 13:53
@pcrespov pcrespov enabled auto-merge (squash) February 17, 2025 14:36
@pcrespov pcrespov force-pushed the mai/project-rest-exception-handlers branch from 5baef91 to 6252336 Compare February 17, 2025 15:09
@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit db4a34e into ITISFoundation:master Feb 17, 2025
93 of 95 checks passed
@pcrespov pcrespov deleted the mai/project-rest-exception-handlers branch February 17, 2025 17:03
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Mar 6, 2025
63 tasks
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Mar 26, 2025
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.

3 participants