dstandish commented on code in PR #31201:
URL: https://github.com/apache/airflow/pull/31201#discussion_r1204720161


##########
airflow/providers/apache/livy/operators/livy.py:
##########
@@ -207,4 +207,5 @@ def execute_complete(self, context: Context, event: 
dict[str, Any]) -> Any:
             self.task_id,
             event["response"],
         )
+        context["ti"].xcom_push(key="app_id", 
value=self.get_hook().get_batch(event["batch_id"])["appId"])

Review Comment:
   I don't see a problem with pushing even in the case of failure.  If 
downstream processes want to take into account that the upstream failed (and 
therefore ignore the xcom) then they can do so.



##########
airflow/providers/apache/livy/operators/livy.py:
##########
@@ -207,4 +207,5 @@ def execute_complete(self, context: Context, event: 
dict[str, Any]) -> Any:
             self.task_id,
             event["response"],
         )
+        context["ti"].xcom_push(key="app_id", 
value=self.get_hook().get_batch(event["batch_id"])["appId"])

Review Comment:
   I don't see a problem with pushing even in the case of failure.  If 
downstream processes want to take into account that the upstream failed (and 
e.g. ignore the xcom) then they can do so.



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