Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented May 21, 2025

What do these changes do?

This PR implements the public-api GET /solvers/page route to List all items of the Solvers collection (paginated) with query filters by attribute solver_id and version_display patterns

Examples

GET /solvers/page # gives you first page of solvers
GET /solvers/page?solver_id=*isolve*  # gives you all isolve flavours and versions
GET /solvers/page?solver_id=*isolve*&version_display=1.0.*  # gives you all isolve flavours on version 1.0.*

Details on the implementation

image

Related issue/s

How to test

  • api-server

    • tests from rest-api to rpc-mocked backend
  • catalog:

    • test_api_rpc.py: tests catalog's rpc_client end-to-end
    • test_repositories.py: tests repo-layer to end
    • tests_service_catalog_service.py: tests service-layer to end
  • Manual exploratory test using api-server swagger site
    image

Dev-ops

None

@pcrespov pcrespov added this to the Bazinga! milestone May 21, 2025
@pcrespov pcrespov self-assigned this May 21, 2025
@pcrespov pcrespov added a:catalog catalog service a:apiserver api-server service labels May 21, 2025
@pcrespov pcrespov force-pushed the is7692/api-server-solvers-filters branch from 26ed315 to 0da66e3 Compare May 21, 2025 12:53
@codecov
Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 81.81818% with 20 lines in your changes missing coverage. Please review.

Project coverage is 87.40%. Comparing base (6c43a0d) to head (088b1d4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7719      +/-   ##
==========================================
+ Coverage   87.38%   87.40%   +0.01%     
==========================================
  Files        1838     1831       -7     
  Lines       71068    70965     -103     
  Branches     1201     1201              
==========================================
- Hits        62106    62025      -81     
+ Misses       8634     8612      -22     
  Partials      328      328              
Flag Coverage Δ
integrationtests 64.52% <ø> (+0.02%) ⬆️
unittests 86.62% <81.81%> (+0.01%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.92% <ø> (ø)
pkg_dask_task_models_library 79.55% <ø> (ø)
pkg_models_library 93.09% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.61% <ø> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 72.23% <0.00%> (-0.06%) ⬇️
pkg_settings_library 90.90% <ø> (ø)
pkg_simcore_sdk 85.07% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 91.58% <92.00%> (-0.02%) ⬇️
autoscaling 96.07% <ø> (ø)
catalog 92.29% <81.15%> (-0.41%) ⬇️
clusters_keeper 99.25% <ø> (ø)
dask_sidecar 91.44% <ø> (-0.23%) ⬇️
datcore_adapter 98.12% <ø> (ø)
director 76.78% <ø> (-0.19%) ⬇️
director_v2 91.00% <ø> (+0.01%) ⬆️
dynamic_scheduler 96.76% <ø> (ø)
dynamic_sidecar 90.18% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.63% <ø> (ø)
resource_usage_tracker 89.02% <ø> (ø)
storage 87.56% <ø> (+0.07%) ⬆️
webclient ∅ <ø> (∅)
webserver 85.73% <ø> (-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 6c43a0d...088b1d4. 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 is7692/api-server-solvers-filters branch from 0da66e3 to 08939a8 Compare May 21, 2025 18:53
@pcrespov pcrespov marked this pull request as ready for review May 22, 2025 08:14
@pcrespov pcrespov force-pushed the is7692/api-server-solvers-filters branch from 225ebce to ab43de0 Compare May 22, 2025 08:14
@pcrespov pcrespov changed the title WIP: 🎨 Is7692/api server solvers filters 🎨 api-server: Add GET /solvers/page Public API Route with Pagination and Filter Support May 22, 2025
@pcrespov pcrespov enabled auto-merge (squash) May 22, 2025 08:19
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.

Pull Request Overview

This PR adds a new “all‐versions” listing endpoint for solvers and catalog services, enabling paginated retrieval of every version’s summary alongside the existing “latest‐only” views.

  • Introduces a ServiceSummary schema and related RPC types (PageRpcServiceSummary)
  • Implements list_all_service_summaries in catalog_services and list_all_services in the repository with pagination and filtering
  • Hooks the new summaries endpoint through RPC, API routes (solvers), and updates tests accordingly

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
services/catalog/src/.../catalog_services.py Added _aggregate_summary and list_all_service_summaries for full-version summaries
services/catalog/src/.../repository/services.py Added list_all_services to repository with count and page queries
services/catalog/src/.../api/rpc/_services.py Exposed list_all_services_summaries_paginated RPC method and new PageRpcServiceSummary
services/api-server/src/.../_service_solvers.py Added list_all_solvers and updated solver service to use summary endpoint
services/api-server/src/.../api/routes/solvers.py New /solvers/page route for all solver versions
services/api-server/tests/.../test_api_routers_solvers.py Updated imports and route tests for new handler
services/catalog/tests/.../test_service_catalog_services.py New unit test for comparing “all” vs “latest” catalog services
services/catalog/tests/.../test_repositories.py Updated repository tests to use pagination_limit / pagination_offset
services/catalog/tests/.../test_api_rpc.py Added RPC tests for list_all_services_summaries_paginated
services/api-server/tests/.../conftest.py Generalized mock setup for all RPC side-effects
Comments suppressed due to low confidence (2)

services/api-server/src/simcore_service_api_server/_service_solvers.py:225

  • There's no list_latest_releases method in catalog_service. This should call list_latest_catalog_services to retrieve the latest versions.
services, page_meta = await self.catalog_service.list_latest_releases(

services/api-server/src/simcore_service_api_server/_service_solvers.py:188

  • The method list_all_services_summaries does not exist in catalog_service. It should call list_all_service_summaries (singular) to match the implementation in catalog_services.py.
services, page_meta = await self.catalog_service.list_all_services_summaries(

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.

thanks 👍

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.

@pcrespov pcrespov force-pushed the is7692/api-server-solvers-filters branch from 64dec91 to 035f3db Compare May 22, 2025 12:31
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.

👍

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.

Did you check the logs of the catalog when running in devel mode?
I see a load of problems appearing there. maybe worth to check at some point?

Thanks.

@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit 1d5454a into ITISFoundation:master May 22, 2025
95 checks passed
@pcrespov pcrespov deleted the is7692/api-server-solvers-filters branch May 22, 2025 17:37
@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

a:apiserver api-server service a:catalog catalog service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Solver listing filters by key and version_display patterns

5 participants