Lee-W opened a new issue, #67692:
URL: https://github.com/apache/airflow/issues/67692

   ### Body
   
   The UI endpoints that return `asset_expression` declare it as `dict | None` 
on the Python datamodel — `datamodels/dags.py`, `datamodels/ui/dags.py`, 
`datamodels/ui/assets.py`, `datamodels/ui/partitioned_dag_runs.py`. OpenAPI gen 
turns this into `{ [k: string]: unknown } | null` in the generated TypeScript, 
so the UI hand-writes an ExpressionType discriminated union in 
`src/components/AssetExpression/` and the consumers (`AssetProgressCell.tsx`, 
`pages/DagsList/AssetSchedule.tsx`) cast unknown as `ExpressionType` with no 
runtime check.
   
   If the server-side shape ever changes the TypeScript build won't catch it — 
the failure mode is a blank render or a discriminator-missing crash at runtime.
   
   from https://github.com/apache/airflow/pull/64571#discussion_r3317834462
   
   ### Committer
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow 
project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to