seanghaeli commented on code in PR #66608:
URL: https://github.com/apache/airflow/pull/66608#discussion_r3314256869


##########
airflow-core/src/airflow/triggers/callback.py:
##########
@@ -52,8 +55,11 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
         try:
             yield TriggerEvent({PAYLOAD_STATUS_KEY: CallbackState.RUNNING})
             callback = import_string(self.callback_path)
-            # TODO: get full context and run template rendering. Right now, a 
simple context is included in `callback_kwargs`
-            context = self.callback_kwargs.pop("context", None)
+
+            # Context is set on this instance by the TriggerRunner (built from 
dag_run_data).
+            # For backward compatibility, fall back to extracting "context" 
from callback_kwargs
+            # (pre-upgrade triggers that were queued before this change).
+            context = self.context or self.callback_kwargs.pop("context", None)

Review Comment:
   Fixed, using `.get()`



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