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


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:
##########
@@ -124,29 +134,48 @@ def __init__(self, *args, **kwargs):
             
fallback=CONFIG_DEFAULTS[AllBatchConfigKeys.MAX_SUBMIT_JOB_ATTEMPTS],
         )
 
-    def queue_workload(self, workload: workloads.All, session: Session | None) 
-> None:
+    def queue_workload(self, workload: WorkloadTypes, session: Session | None) 
-> None:
         from airflow.executors import workloads
 
-        if not isinstance(workload, workloads.ExecuteTask):
+        if AIRFLOW_V_3_3_PLUS and isinstance(workload, 
workloads.ExecuteCallback):
+            self.queued_callbacks[workload.callback.id] = workload
+        elif isinstance(workload, workloads.ExecuteTask):
+            ti = workload.ti
+            self.queued_tasks[ti.key] = workload
+        else:
             raise RuntimeError(f"{type(self)} cannot handle workloads of type 
{type(workload)}")
-        ti = workload.ti
-        self.queued_tasks[ti.key] = workload
 
-    def _process_workloads(self, workloads: Sequence[workloads.All]) -> None:
-        from airflow.executors.workloads import ExecuteTask
+    def _process_workloads(self, workloads: Sequence[WorkloadTypes]) -> None:
+        from airflow.executors import workloads as wl

Review Comment:
   Sorry for the delay.   I've asked them all to make the same change, you 
don't need to handle it all.  I believe Celery is the only one that isn't being 
fixed at the moment and we can do that one when we do Base.
   
   I don't think we need to worry about the parameter name mismatch as much as 
you are.  It's a "private" method with only one parameter so it is only ever 
being called by positional args and the name doesn't matter.



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