jscheffl commented on code in PR #38650:
URL: https://github.com/apache/airflow/pull/38650#discussion_r1546089068
##########
airflow/operators/python.py:
##########
@@ -232,7 +232,11 @@ def execute(self, context: Context) -> Any:
context_merge(context, self.op_kwargs,
templates_dict=self.templates_dict)
self.op_kwargs = self.determine_kwargs(context)
- return_value = self.execute_callable()
+ try:
+ dataset_events = context["dataset_events"]
+ except KeyError:
+ dataset_events = context["dataset_events"] =
DatasetEventAccessors()
+ return_value = self.execute_callable(dataset_events)
Review Comment:
I am not sure why we need that change to add `dataset_events` to the calling
args - we don't add other context information here as well. Why should be
dataset event be different than other context vars?
--
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]