Bug
Adding a Deliverable to a Data Product fails with 400 Failed to add deliverable whenever the Delivery Method dropdown is set to any value.
Steps to reproduce
- Settings → Reference Data → Delivery Methods → add at least one method (e.g.
Table Access)
- Create a Data Product (e.g.
Customer 360)
- On the product detail view, click + Add Deliverable
- Fill the dialog with at least Name, Version, and any Delivery Method from the dropdown
- Click Add Deliverable
Expected
Deliverable saves; the product detail view lists it under Deliverables.
Actual
Red toast: Failed to add deliverable (400). Network response:
1 validation error for DataProduct
output_ports.0.delivery_method_id
Input should be a valid string [type=string_type, input_value=UUID('17545eff-3fa0-42e8-863a-be3947adbb41'), input_type=UUID]
Cause
delivery_method_id reaches the Pydantic model as a Python UUID instance. The model in src/backend/src/models/data_products.py declares:
deliveryMethodId: Optional[str] = Field(None, alias="delivery_method_id", ...)
Strict-mode Pydantic v2 rejects the implicit UUID → str cast.
Workaround
Leave the Delivery Method field empty when adding a Deliverable; the request succeeds because delivery_method_id is then null.
Suggested fix
Either coerce the UUID to a string before serialisation (str(uuid) in the frontend layer that builds the request body), or accept UUID on the backend with a coercing validator:
from uuid import UUID
from pydantic import field_validator
deliveryMethodId: Optional[str] = Field(None, alias="delivery_method_id", ...)
@field_validator("deliveryMethodId", mode="before")
@classmethod
def _coerce_uuid_to_str(cls, v):
return str(v) if isinstance(v, UUID) else v
Environment
- Ontos deployed via
databricks bundle deploy from main (commit synced 2026-05-06)
- Azure Databricks workspace, OBO auth, Lakebase Autoscaling Postgres
- Browser: Chrome
Bug
Adding a Deliverable to a Data Product fails with
400 Failed to add deliverablewhenever the Delivery Method dropdown is set to any value.Steps to reproduce
Table Access)Customer 360)Expected
Deliverable saves; the product detail view lists it under Deliverables.
Actual
Red toast: Failed to add deliverable (400). Network response:
Cause
delivery_method_idreaches the Pydantic model as a PythonUUIDinstance. The model insrc/backend/src/models/data_products.pydeclares:Strict-mode Pydantic v2 rejects the implicit
UUID → strcast.Workaround
Leave the Delivery Method field empty when adding a Deliverable; the request succeeds because
delivery_method_idis thennull.Suggested fix
Either coerce the UUID to a string before serialisation (
str(uuid)in the frontend layer that builds the request body), or acceptUUIDon the backend with a coercing validator:Environment
databricks bundle deployfrommain(commit synced 2026-05-06)