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

WIP: ✨ Is7097/fetch vip api 🗃️ 🚨 #7140

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jan 29, 2025

What do these changes do?

Fetches models published in vip-api, validates them and syncs with items already in licensed_items

🗃️ postgres-database

  • new columns for licensed_items: licensed_resource_data and trashed
  • product_name and pricing_plan_id nullable. This is how we identify which of the items are ready or not
    • change and migration
    • discuss with MD+OM
    • filter_ready in list?
  • settings

steps

  • fetches & validate published resources from vip-downloadable http api
  • items are injected in items_licensed, e.g. licensed_resource_data includes category, description etc
    • separate table to map pricing_plan and product_name? one vip available in different products? Activation is done in a different table this way
  • sync policies for fetched data
    • new item -> insert as (VIP_MODEL, $category/$ID) leaving product,pricing_plan until human activates it.
    • item deleted -> mark as trashed and warn
    • item update -> warn and display the update. Trash/disable? what if item was sold? add new entry? human validation?
    • item w/o license key?
    • item w/o downloadable?
  • background to sync with vip-api.
    • service api and init in GC service (for now) or can be background task
  • web-api provides licensed_resource_data so front-end can display catalog
    • does public-api needs that (e.g. app might want to display catalog as well)

Related issue/s

How to test

Driving tests

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

Dev-ops

  • 🚨 After the first sync, make sure to enable new items by assigning corresponding product (product_name) and princing plans (pricing_plan_id)

@pcrespov pcrespov added this to the Singularity milestone Jan 29, 2025
@pcrespov pcrespov self-assigned this Jan 29, 2025
@pcrespov pcrespov added a:webserver issue related to the webserver service a:database associated to postgres service and postgres-database package labels Jan 29, 2025
@pcrespov pcrespov changed the title WIP: ✨ Is7097/fetch vip api 🗃️ WIP: ✨ Is7097/fetch vip api 🗃️ 🚨 Jan 29, 2025
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 93.57798% with 7 lines in your changes missing coverage. Please review.

Project coverage is 88.83%. Comparing base (b837ee0) to head (894505a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7140      +/-   ##
==========================================
+ Coverage   84.70%   88.83%   +4.12%     
==========================================
  Files        1393     1422      +29     
  Lines       56986    56920      -66     
  Branches      909      695     -214     
==========================================
+ Hits        48271    50564    +2293     
+ Misses       8473     6189    -2284     
+ Partials      242      167      -75     
Flag Coverage Δ
integrationtests 64.47% <15.59%> (-0.20%) ⬇️
unittests 87.81% <93.57%> (+4.68%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.49% <ø> (ø)
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 88.39% <ø> (∅)
pkg_service_integration 70.18% <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.50% <ø> (+7.95%) ⬆️
agent 96.46% <ø> (ø)
api_server 90.55% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 90.33% <ø> (ø)
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.19% <ø> (ø)
director 77.01% <ø> (+0.08%) ⬆️
director_v2 91.29% <ø> (+0.02%) ⬆️
dynamic_scheduler 97.21% <ø> (ø)
dynamic_sidecar 89.78% <ø> (+0.03%) ⬆️
efs_guardian 90.25% <ø> (∅)
invitations 93.28% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.06% <ø> (∅)
storage 89.57% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 86.24% <93.57%> (+8.71%) ⬆️

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 b837ee0...894505a. Read the comment docs.

@pcrespov pcrespov force-pushed the is7097/fetch-vip-api branch from 8fac934 to f266505 Compare January 30, 2025 00:02
@pcrespov pcrespov force-pushed the is7097/fetch-vip-api branch from 17762ce to 77be4fc Compare January 30, 2025 15:50
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:database associated to postgres service and postgres-database package a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant