Skip to content

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Aug 26, 2025

What do these changes do?

  • πŸ—‘οΈ Removes project_alias (requested by @odeimaiz)
  • πŸ› Do not copy phone number from pre-registration since it is not verified (i.e. we do nt kow it is actually working) (reported by @odeimaiz)
  • πŸ› Fixes validation error on products if product.vendor.ui is (reported by @pcrespov
{
	"url": "https://itis.swiss",
	"name": "IT'IS Foundation",
	"copyright": "Β© IT'IS Foundation",
	"license_url": "http://docs.osparc.io/#/docs/support/license",
	"invitation_form": true,
	"ui": {
		"logo_url": "https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-black.svg",
		"strong_color": "rgb(131, 0, 191)",
		"project_alias": "project"
	}
}

This fails validation upon startup like

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/scu/.venv/lib/python3.11/site-packages/simcore_service_webserver/products/_web_events.py", line 47, in _load_products_on_startup
    product.name: product for product in await _service.load_products(app)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/scu/.venv/lib/python3.11/site-packages/simcore_service_webserver/products/_service.py", line 31, in load_products
    raise InvalidConfig(msg) from err
servicelib.exceptions.InvalidConfig: Invalid product configuration in db:
 1 validation error for Product
vendor.ui.logoUrl
  Field required [type=missing, input_value={'logo': 'https://raw.git...oject_alias': 'project'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/missing

As a consequence, the templates do note render the log in the emails

Related issue/s

How to test

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

Dev-ops

⚠️ When released: @pcrespov adds vendor config for corresponding products and tests emails

  • master deploy
  • staging deploy
  • production deploy

@pcrespov pcrespov added this to the Voyager milestone Aug 26, 2025
@pcrespov pcrespov self-assigned this Aug 26, 2025
Copy link
Contributor

mergify bot commented Aug 26, 2025

πŸ§ͺ CI Insights

Here's what we observed from your CI run for 99b907f.

βœ… Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries πŸ” CI Insights πŸ“„ Logs
CI unit-tests Base branch is healthy, but retries were needed. Could be early signs of flakiness πŸ‘€ Healthy 1 View View

@pcrespov pcrespov force-pushed the fix/product-validation-vendor-ui branch from e87ef27 to 543e6c9 Compare August 26, 2025 15:52
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 87.91%. Comparing base (2ac6d38) to head (99b907f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8266      +/-   ##
==========================================
+ Coverage   87.89%   87.91%   +0.01%     
==========================================
  Files        1933     1933              
  Lines       74941    74941              
  Branches     1309     1309              
==========================================
+ Hits        65871    65882      +11     
+ Misses       8677     8666      -11     
  Partials      393      393              
Flag Coverage Ξ”
integrationtests 64.12% <37.50%> (+0.03%) ⬆️
unittests 86.56% <100.00%> (ΓΈ)
Components Coverage Ξ”
pkg_aws_library 93.59% <ΓΈ> (ΓΈ)
pkg_celery_library 87.37% <ΓΈ> (ΓΈ)
pkg_dask_task_models_library 79.62% <ΓΈ> (ΓΈ)
pkg_models_library 93.09% <ΓΈ> (ΓΈ)
pkg_notifications_library 85.20% <ΓΈ> (-0.07%) ⬇️
pkg_postgres_database 88.02% <ΓΈ> (-0.01%) ⬇️
pkg_service_integration 70.19% <ΓΈ> (ΓΈ)
pkg_service_library 71.19% <ΓΈ> (ΓΈ)
pkg_settings_library 90.17% <ΓΈ> (ΓΈ)
pkg_simcore_sdk 85.03% <ΓΈ> (ΓΈ)
agent 93.53% <ΓΈ> (ΓΈ)
api_server 92.76% <ΓΈ> (+0.02%) ⬆️
autoscaling 95.77% <ΓΈ> (ΓΈ)
catalog 92.34% <ΓΈ> (ΓΈ)
clusters_keeper 99.13% <ΓΈ> (ΓΈ)
dask_sidecar 92.37% <ΓΈ> (ΓΈ)
datcore_adapter 97.94% <ΓΈ> (ΓΈ)
director 75.81% <ΓΈ> (ΓΈ)
director_v2 90.94% <ΓΈ> (+0.02%) ⬆️
dynamic_scheduler 96.27% <ΓΈ> (ΓΈ)
dynamic_sidecar 90.46% <ΓΈ> (ΓΈ)
efs_guardian 89.62% <ΓΈ> (ΓΈ)
invitations 91.44% <ΓΈ> (ΓΈ)
payments 92.61% <ΓΈ> (ΓΈ)
resource_usage_tracker 92.18% <ΓΈ> (ΓΈ)
storage 86.49% <ΓΈ> (ΓΈ)
webclient βˆ… <ΓΈ> (βˆ…)
webserver 88.08% <100.00%> (+0.03%) ⬆️

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 2ac6d38...99b907f. 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 fix/product-validation-vendor-ui branch from 3061f7e to 3c6e667 Compare August 26, 2025 17:20
@pcrespov pcrespov changed the title πŸ› Fixes validation of product vendor ui object πŸ› Fixes validation of product vendor ui object and drops unused project_alias Aug 26, 2025
@pcrespov pcrespov added the a:webserver webserver's codebase. Assigning the area is particularly useful for bugs label Aug 26, 2025
@pcrespov pcrespov changed the title πŸ› Fixes validation of product vendor ui object and drops unused project_alias WIP: πŸ› Fixes validation of product vendor ui object and drops unused project_alias Aug 27, 2025
@pcrespov pcrespov force-pushed the fix/product-validation-vendor-ui branch from 3c6e667 to 9e6e1f0 Compare September 1, 2025 13:11
@pcrespov pcrespov force-pushed the fix/product-validation-vendor-ui branch from 9e6e1f0 to e2f6c6d Compare September 1, 2025 14:25
@pcrespov pcrespov changed the title WIP: πŸ› Fixes validation of product vendor ui object and drops unused project_alias πŸ›πŸ—‘οΈ Fixes validation of product vendor ui object and drops unused project_alias ⚠️ Sep 1, 2025
@pcrespov pcrespov marked this pull request as ready for review September 1, 2025 15:42
@pcrespov pcrespov enabled auto-merge (squash) September 1, 2025 16:05
@pcrespov pcrespov requested a review from Copilot September 1, 2025 16:05
Copy link
Contributor

@Copilot 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 fixes validation issues with the product vendor UI object and removes the unused project_alias field as requested. The main issue was that the product validation was failing when vendor.ui contained a project_alias field that wasn't defined in the VendorUI TypedDict, causing email templates to not render logos properly.

Key Changes

  • Removes project_alias field from VendorUI TypedDict and related models
  • Updates email templates to use hardcoded "project" instead of dynamic project_alias
  • Fixes product configuration model validation by removing alias generation and updating configuration

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/postgres-database/src/simcore_postgres_database/models/products.py Removes project_alias from VendorUI TypedDict definition
packages/notifications-library/src/notifications_library/_models.py Removes project_alias field from ProductUIData dataclass
services/web/server/src/simcore_service_webserver/products/_models.py Updates Product model configuration and removes alias generation
services/web/server/src/simcore_service_webserver/statics/_events.py Adds helper function for product data conversion with snake_to_camel
services/web/server/src/simcore_service_webserver/users/_accounts_service.py Removes project_alias extraction from product vendor UI
packages/notifications-library/src/notifications_library/templates/* Updates email templates to use hardcoded "project" text
packages/pytest-simcore/src/pytest_simcore/helpers/faker_factories.py Removes project_alias from random product factory
services/web/server/src/simcore_service_webserver/products/_repository.py Renames function from _to_domain to _db_to_domain

@pcrespov pcrespov removed this from the Voyager milestone Sep 1, 2025
@pcrespov pcrespov added this to the Cheops milestone Sep 1, 2025
@pcrespov pcrespov added the πŸ€–-automerge marks PR as ready to be merged for Mergify label Sep 1, 2025
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.

thanks

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

Copy link

sonarqubecloud bot commented Sep 2, 2025

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.

Great! Thanks

@pcrespov pcrespov merged commit 8d908b2 into ITISFoundation:master Sep 2, 2025
144 of 148 checks passed
@pcrespov pcrespov deleted the fix/product-validation-vendor-ui branch September 2, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ€–-automerge marks PR as ready to be merged for Mergify 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.

5 participants