Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Apr 15, 2025

What do these changes do?

Exposes the list_my_projects_marked_as_jobs method on the web-server RPC interface to enable the api-server to retrieve a paginated list of all projects marked as jobs.

  • Implements service-layer: simcore_service_webserver.projects._jobs_service
  • Implements repository-layer: simcore_service_webserver.projects._jobs_repository
  • Exposes function to RPC API
    • server side: projects._controller.projects_rpc
    • client side: servicelib.rabbitmq.rpc_interfaces.webserver.projects
    • models: models_library.rpc.webserver.projects (shared)
    • exceptions: servicelib.rabbitmq.rpc_interfaces.webserver.errors (shared)

NOTE: The current organization of RPC interfaces feels fragmented and hard to work with. We should consider restructuring them into dedicated Python packages (e.g., webserver-rpc-client, webserver-rest-client) to improve clarity and maintainability. The only inconvenient with the proposed approach is that the client has to be installed in the server in order to share models and exceptions. In any case, we already do that with the current setup.

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv tests/unit/with_dbs/02/test_projects_rpc.py
pytest -vv tests/unit/with_dbs/02/test_projects__jobs_service.py

Dev-ops

None

@pcrespov pcrespov self-assigned this Apr 15, 2025
@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

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

Project coverage is 87.33%. Comparing base (b4ffe76) to head (2f4901c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7534      +/-   ##
==========================================
- Coverage   87.47%   87.33%   -0.15%     
==========================================
  Files        1742     1570     -172     
  Lines       67432    63499    -3933     
  Branches     1144      910     -234     
==========================================
- Hits        58987    55457    -3530     
+ Misses       8124     7782     -342     
+ Partials      321      260      -61     
Flag Coverage Δ
integrationtests 65.20% <53.65%> (-0.10%) ⬇️
unittests 86.46% <84.37%> (-0.20%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 92.00% <100.00%> (+0.01%) ⬆️
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.03% <ø> (ø)
pkg_service_library 72.53% <0.00%> (-0.13%) ⬇️
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.40% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 90.26% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 92.52% <ø> (ø)
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.29% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.78% <ø> (-0.10%) ⬇️
director_v2 91.30% <ø> (ø)
dynamic_scheduler 97.40% <ø> (ø)
dynamic_sidecar 90.11% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.66% <ø> (ø)
resource_usage_tracker 88.96% <ø> (-0.28%) ⬇️
storage 87.59% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 85.97% <100.00%> (+0.02%) ⬆️

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 b4ffe76...2f4901c. 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 is7399/list-projects-rpc branch from 32e2c95 to b2e6286 Compare April 15, 2025 16:23
@pcrespov pcrespov changed the title WIP: Is7399/list projects rpc ✨ web-server RPC: exposes list_my_projects_marked_as_jobs Apr 15, 2025
@pcrespov pcrespov added this to the Pauwel Kwak milestone Apr 15, 2025
@pcrespov pcrespov added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs a:services-library issues on packages/service-libs labels Apr 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pcrespov pcrespov requested a review from bisgaard-itis April 15, 2025 16:45
@pcrespov pcrespov marked this pull request as ready for review April 15, 2025 16:45
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! 💯

@pcrespov
Copy link
Member Author

@giancarloromeo @matusdrobuliak66 any comments on the note?

@pcrespov pcrespov force-pushed the is7399/list-projects-rpc branch from 0b547a4 to 8cab4ca Compare April 16, 2025 09:41
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.

Very nice! Thanks a lot for the effort

@pcrespov pcrespov force-pushed the is7399/list-projects-rpc branch from 8cab4ca to 2f4901c Compare April 16, 2025 12:03
@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit 0137533 into ITISFoundation:master Apr 16, 2025
93 of 94 checks passed
@pcrespov pcrespov deleted the is7399/list-projects-rpc branch April 16, 2025 14:00
@giancarloromeo
Copy link
Contributor

I agree with separation into different packages, but I don't get this:

The only inconvenient with the proposed approach is that the client has to be installed in the server in order to share models and exceptions.

Why models and exceptions can't live in a separate package as well, installed when needed?

@matusdrobuliak66 matusdrobuliak66 mentioned this pull request May 8, 2025
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:services-library issues on packages/service-libs a:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants