The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix-hitl-review-output-type-loss has succeeded.
Run started by GitHub user ColtenOuO (triggered by ColtenOuO).

Head commit for run:
d0c355004e9f4375a8fc8f3989f73813b117474b / ColtenOuO <[email protected]>
Preserve BaseModel elements when rehydrating a generic-alias output_type

rehydrate_pydantic_output gated the TypeAdapter path on isinstance(unwrapped, 
type),
which is False for a generic alias like list[A]. That routed list[A] into the 
plain
json.loads fallback meant for output functions and [A, B] union lists, silently
turning a reviewer-approved list of A instances back into a list of plain dicts.
Gate on typing.get_origin(...) is not None as well so generic aliases still 
reach
TypeAdapter, while output functions (which are not generic aliases) keep falling
back to JSON instead of being re-invoked with reviewer-controlled input.

serialize_output's dump step also moves from an isinstance(rehydrated, 
BaseModel)
check to adapter.dump_python(rehydrated, mode="python"), since a rehydrated 
list[A]
is a list, not a BaseModel, and needs the same dict-shape dump its elements got
before this fix.

Report URL: https://github.com/apache/airflow/actions/runs/32143889920

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to