Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Implementing new list_services_paginated entrypoint in web-api (part 1) #5991

Merged
merged 47 commits into from
Jul 4, 2024

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 24, 2024

What do these changes do?

In PR #6003 we implemented a new rpc interface in the catalog and connected it with the rest api of the webserver service. This PR partially implements api.rpc._services.list_services_paginated.

Specifically:

  • implements repository layer (i.e. db.repositories.services)
  • implements services layer (i.e. services.catalog.list_services_paginated)
    • only the data from the database is included.
    • data from image labels is still not included
  • connects controller layer (i.e. api.rpc._services) to service layer
  • ♻️ Adapting ServiceGetV2 model in coordination with @odeimaiz

Following up PRs will cover:

  • connection with registry/director
  • compatibility rules

Related issue/s

How to test

Driving tests

  • services/catalog/tests/unit/with_dbs/test_db_repositories.py
  • Manual exploratory test: use /dev/catalog/services-
    • set WEBSERVER_DEV_FEATURE_ENABLED=1 (i.e. configuration in master deploy)
    • start stack
    • open swagger at /dev/doc
    • execute GET /dev/catalog/services/-/latest. Expected fast and short response body
    • compare with GET /catalog/services/latest. Expected slow and long response body

Dev-ops checklist

None

@pcrespov pcrespov self-assigned this Jun 24, 2024
@pcrespov pcrespov added this to the South Island Iced Tea milestone Jun 24, 2024
@pcrespov pcrespov added the a:catalog catalog service label Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 95.29412% with 8 lines in your changes missing coverage. Please review.

Project coverage is 87.7%. Comparing base (cafbf96) to head (1550b6c).
Report is 319 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5991      +/-   ##
=========================================
+ Coverage    84.5%   87.7%    +3.2%     
=========================================
  Files          10    1289    +1279     
  Lines         214   55418   +55204     
  Branches       25    1101    +1076     
=========================================
+ Hits          181   48648   +48467     
- Misses         23    6531    +6508     
- Partials       10     239     +229     
Flag Coverage Δ
integrationtests 64.7% <ø> (?)
unittests 85.7% <95.2%> (+1.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...src/models_library/api_schemas_catalog/services.py 100.0% <100.0%> (ø)
...dels-library/src/models_library/services_access.py 100.0% <ø> (ø)
...s-library/src/models_library/services_authoring.py 100.0% <100.0%> (ø)
...els-library/src/models_library/services_history.py 100.0% <100.0%> (ø)
...icelib/rabbitmq/rpc_interfaces/catalog/services.py 0.0% <ø> (ø)
.../src/simcore_service_catalog/api/rest/_services.py 59.3% <100.0%> (ø)
...ervice_catalog/api/rest/_services_access_rights.py 100.0% <100.0%> (ø)
...g/src/simcore_service_catalog/api/rpc/_services.py 100.0% <100.0%> (ø)
...e_service_catalog/db/repositories/_services_sql.py 100.0% <100.0%> (ø)
.../simcore_service_catalog/db/repositories/groups.py 56.7% <100.0%> (ø)
... and 5 more

... and 1267 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is5964/catalog-service-api branch 6 times, most recently from 6872f4c to 6faffb9 Compare July 3, 2024 09:48
@pcrespov pcrespov force-pushed the is5964/catalog-service-api branch from 1321962 to 32162b6 Compare July 4, 2024 08:20
@pcrespov pcrespov changed the title WIP: ✨ Is5964/catalog service api ✨ Implementing new list_services_paginated entrypoint in web-api (part 1) Jul 4, 2024
@pcrespov pcrespov marked this pull request as ready for review July 4, 2024 11:12
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.

thanks

@pcrespov pcrespov requested a review from GitHK as a code owner July 4, 2024 11:22
Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov enabled auto-merge (squash) July 4, 2024 13:12
@pcrespov pcrespov force-pushed the is5964/catalog-service-api branch from a3e63f3 to 1550b6c Compare July 4, 2024 13:12
Copy link
Contributor

@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.

Thanks

@pcrespov pcrespov merged commit 7bbe389 into ITISFoundation:master Jul 4, 2024
55 of 56 checks passed
@pcrespov pcrespov deleted the is5964/catalog-service-api branch July 4, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:catalog catalog service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants