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

🎨 Drafts new web-api for catalog services #5969

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 19, 2024

What do these changes do?

This PR drafts new entrypoints for the web-api for catalog/services collection. Specifically
image

These entrypoints have been redesigned to:

  • reduce the amount of items in the responses
  • include service history (i.e all version)
  • resolve version compatibility

NOTE: these entrypoints are only available with WEBSERVER_DEV_FEATURES_ENABLED=1, i.e. only available in master for testing.

Hightlights

  • ⚗️ Drafts new API to list, get and update a service
    • list operation only returns only latest versions of each service (in contrast to the previous implementation that returned every single version). This already will drastically reduce the amount of items listed.
    • list includes pagination
    • To get the information of other versions, the new model includes a history field with with all the releases of the service.
    • history also includes information on version compatibility that will now be resolved in the backend. Therefore, given a service,
      • the latest compatible version is found under history[*].compatibility.can_update_to
      • the latest version of that service is history[0]
  • ♻️ Organized service_metadata_... model variants
  • 🔨 increase test coverage of labels_annotations module
  • 🔨 ♻️ refactors catalog plugin tests

Related issue/s

How to test

  • Setup local deploy or in master and manually test dev entrypoints. They provide fake data but it is consistent with new models

Dev-ops checklist

None

@pcrespov pcrespov self-assigned this Jun 19, 2024
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.3%. Comparing base (cafbf96) to head (53ff2cf).
Report is 291 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5969      +/-   ##
=========================================
+ Coverage    84.5%   86.3%    +1.7%     
=========================================
  Files          10    1161    +1151     
  Lines         214   50763   +50549     
  Branches       25     562     +537     
=========================================
+ Hits          181   43843   +43662     
- Misses         23    6794    +6771     
- Partials       10     126     +116     
Flag Coverage Δ
integrationtests 64.7% <41.6%> (?)
unittests 86.4% <100.0%> (+1.8%) ⬆️

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%> (ø)
...rc/models_library/api_schemas_webserver/catalog.py 100.0% <100.0%> (ø)
...ages/models-library/src/models_library/services.py 100.0% <100.0%> (ø)
...s/models-library/src/models_library/services_db.py 100.0% <100.0%> (ø)
...els-library/src/models_library/services_history.py 100.0% <100.0%> (ø)
...y/src/models_library/services_metadata_editable.py 100.0% <ø> (ø)
.../src/models_library/services_metadata_published.py 100.0% <100.0%> (ø)
...src/simcore_service_webserver/catalog/_handlers.py 76.0% <100.0%> (ø)

... and 1148 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is5964/web-api-catalog-services branch from e2b26d4 to 198bc11 Compare June 20, 2024 17:11
@pcrespov pcrespov force-pushed the is5964/web-api-catalog-services branch from 198bc11 to eecc67f Compare June 20, 2024 18:37
@pcrespov pcrespov added this to the South Island Iced Tea milestone Jun 20, 2024
@pcrespov pcrespov changed the title WIP: 🎨 Is5964/web api catalog services 🎨 Drafts new web-api for catalog services Jun 20, 2024
@pcrespov pcrespov marked this pull request as ready for review June 20, 2024 20:13
@pcrespov pcrespov requested a review from sanderegg as a code owner June 20, 2024 20:13
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.

a few comments, that we can discuss. 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.

Looks cool. I am not sure I actually understand the details of how it will work.

@pcrespov pcrespov requested a review from GitHK June 21, 2024 07:35
@pcrespov pcrespov enabled auto-merge (squash) June 21, 2024 07:53
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.

Let's go!

@pcrespov pcrespov merged commit 6890109 into ITISFoundation:master Jun 21, 2024
56 checks passed
@pcrespov pcrespov deleted the is5964/web-api-catalog-services branch June 21, 2024 11:37
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jul 5, 2024
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants