naruto-lgtm commented on PR #68662:
URL: https://github.com/apache/airflow/pull/68662#issuecomment-5083369558

   On the wider implications, I went through the surfaces that actually carry 
BaseSerialization blobs:
   
   **Serialized Dags** — regenerated on every parse, and a Dag never 
legitimately holds an exception object, so nothing there.
   
   **Trigger / next_kwargs, encode side** — the current path serializes with 
`airflow.sdk.serde`, not BaseSerialization, so it was never emitting the 
exception tags anyway. `Trigger.submit_failure` already packs a formatted 
traceback rather than the exception instance. The one place core still encodes 
through BaseSerialization is the old-worker compat converter in 
`api_fastapi/execution_api/versions/v2026_04_06.py`, which re-serializes 
next_kwargs for task-sdk < 1.2. If a trigger event payload carried an actual 
exception instance, an old worker now receives `str(exc)` where it previously 
got a reconstructed instance.
   
   **Trigger / next_kwargs, decode side** — this is the one sharp edge. 
`trigger.py` still falls back to `BaseSerialization.deserialize` for rows 
written in the old format. A row that already contains an `airflow_exc_ser` / 
`base_exc_ser` tag, i.e. a task deferred before the upgrade whose next_kwargs 
nested an exception, now raises `TypeError: Invalid type ...` instead of 
reconstructing it. Narrow, but it is an upgrade-path regression rather than a 
purely internal change, so worth naming.
   
   If you want that closed, the smallest version is to keep the two tags 
recognised on the decode side only and return the payload's string form instead 
of importing and calling anything. Old rows keep deserializing across an 
upgrade, no `import_string` on a payload-supplied name comes back, and the 
encode side stays gone so nothing new is ever written in that format. Happy to 
push that if you'd prefer it over a clean break.
   
   Otherwise: no in-tree references to the removed `DagAttributeTypes` members 
remain. Third-party code reaching for `DAT.AIRFLOW_EXC_SER` directly would 
break, but that enum isn't public API.


-- 
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