shivaam commented on code in PR #62984:
URL: https://github.com/apache/airflow/pull/62984#discussion_r2937493282


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:
##########
@@ -337,18 +357,18 @@ def attempt_submit_jobs(self):
                     self.log.error(
                         (
                             "This job has been unsuccessfully attempted too 
many times (%s). "
-                            "Dropping the task. Reason: %s"
+                            "Dropping the workload. Reason: %s"
                         ),
                         attempt_number,
                         failure_reason,
                     )
                     self.log_task_event(
                         event="batch job submit failure",
                         extra=f"This job has been unsuccessfully attempted too 
many times ({attempt_number}). "
-                        f"Dropping the task. Reason: {failure_reason}",
-                        ti_key=key,
+                        f"Dropping the workload. Reason: {failure_reason}",
+                        ti_key=workload_key,
                     )
-                    self.fail(key=key)
+                    self.fail(key=workload_key)

Review Comment:
   When a callback workload exceeds max submit attempts, log_task_event is 
called with ti_key=workload_key. For callbacks, this key is a string UUID, not 
a TaskInstanceKey named tuple, which will cause errors since 
Log(task_instance=...) expects a TaskInstanceKey.



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