o-nikolas commented on code in PR #48513:
URL: https://github.com/apache/airflow/pull/48513#discussion_r2029452617


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:
##########
@@ -462,6 +497,24 @@ def execute_async(self, key: TaskInstanceKey, command: 
CommandType, queue=None,
         """Save the task to be executed in the next sync by inserting the 
commands into a queue."""
         if executor_config and ("name" in executor_config or "command" in 
executor_config):
             raise ValueError('Executor Config should never override "name" or 
"command"')
+        if len(command) == 1:
+            from airflow.executors.workloads import ExecuteTask
+
+            if isinstance(command[0], ExecuteTask):
+                workload = command[0]
+                ser_input = workload.model_dump_json()
+                command = [
+                    "python",
+                    "-m",
+                    "airflow.sdk.execution_time.execute_workload",
+                    "--json-string",
+                    ser_input,
+                ]

Review Comment:
   For now yes, there isn't really an easier way to get this into the 
containers without other external services. So as a basic implementation, we're 
okay with this.



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