potiuk opened a new pull request, #68528:
URL: https://github.com/apache/airflow/pull/68528

   ## What
   
   Removes the `DAT.BASE_TRIGGER` serialization path — encoding/decoding a 
`BaseTrigger` **instance** through `BaseSerialization` — which is dead code 
left over from AIP-44's Internal API:
   
   - the encode branch (`isinstance(var, BaseTrigger)`), the decode branch 
(`type_ == DAT.BASE_TRIGGER`), the `DAT.BASE_TRIGGER` enum value, and the 
now-unused `BaseTrigger` import;
   - `TaskDeferred` is also dropped from the exception-encode tuple — 
`TaskDeferred(BaseException)`'s only role there was carrying a trigger over the 
AIP-44 RPC.
   
   Generic `AirflowException` / `BASE_EXC_SER` serialization is **kept** — it 
has live test coverage and an exception can still reach the serializer via XCom 
/ `next_kwargs` / the `ExtendedJSON` column.
   
   ## Why it's dead
   
   The live deferral path never serializes a trigger through 
`BaseSerialization`:
   
   - A task that defers builds a structured `DeferTask` / 
`TIDeferredStatePayload` from `defer.trigger.serialize()` (the trigger's own 
classpath + kwargs) — see `task_runner._defer_task`.
   - The execution API stores `Trigger(classpath=<str>, 
encrypted_kwargs=<blob>)` without instantiating anything 
(`routes/task_instances.py`); the triggerer later imports the classpath from 
the DB row.
   - AIP-44's Internal API — the RPC that serialized runtime objects like 
triggers/exceptions over the wire — has been removed.
   
   `DAT.BASE_TRIGGER` was referenced only inside `serialized_objects.py` + 
`enums.py` + tests — no external producer or consumer. (`BaseTrigger.hash` 
serializes the trigger's *kwargs* dict, not the trigger, so it never hit this 
branch.)
   
   ## Relationship to #67926 / #68511
   
   - **Supersedes #67926** — it gated the now-removed `DAT.BASE_TRIGGER` decode.
   - **Complements #68511**, whose `_safe_import_for_deserialize` gate on the 
*exception* decode (`import_string(exc_cls_name)`) protects a path this PR 
keeps live.
   


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