ferruzzi commented on code in PR #63035:
URL: https://github.com/apache/airflow/pull/63035#discussion_r2943254916


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:
##########
@@ -313,59 +377,59 @@ def attempt_task_runs(self):
                 failure_reasons.append(str(e))
 
             if failure_reasons:
-                # Make sure the number of attempts does not exceed max invoke 
attempts
+                # Make sure the number of attempts does not exceed max invoke 
attempts.
                 if int(attempt_number) < int(self.max_invoke_attempts):
-                    task_to_run.attempt_number += 1
-                    task_to_run.next_attempt_time = timezone.utcnow() + 
calculate_next_attempt_delay(
+                    workload_to_run.attempt_number += 1
+                    workload_to_run.next_attempt_time = timezone.utcnow() + 
calculate_next_attempt_delay(
                         attempt_number
                     )
-                    self.pending_tasks.append(task_to_run)
+                    self.pending_workloads.append(workload_to_run)
                 else:
                     reasons_str = ", ".join(failure_reasons)
                     self.log.error(
                         "Lambda invoke %s has failed a maximum of %s times. 
Marking as failed. Reasons: %s",
-                        task_key,
+                        workload_key,
                         attempt_number,
                         reasons_str,
                     )
                     self.log_task_event(
                         event="lambda invoke failure",
-                        ti_key=task_key,
+                        ti_key=workload_key,

Review Comment:
   Yup, good catch.   I think the cleanest solution for now will be to add an 
optional `workload` parameter to Log() which will work for either type, and a 
note that we need to clean that up in the future.  Don't remove the 
task_instance parameter since that will break things, but add the new 
`workload` and use it here.



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