jscheffl commented on code in PR #53927:
URL: https://github.com/apache/airflow/pull/53927#discussion_r2248794540


##########
providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py:
##########
@@ -139,21 +139,46 @@ def execute_async(
         task_instance = self.edge_queued_tasks[key][3]  # type: ignore[index]
         del self.edge_queued_tasks[key]
 
-        self.validate_airflow_tasks_run_command(command)  # type: 
ignore[attr-defined]
-        session.add(
-            EdgeJobModel(
+        # Run validation only if supported (available in Airflow 2.12+)
+        # This makes it compatible with older versions like 2.10 and 2.11
+        if hasattr(self, "validate_airflow_tasks_run_command"):
+            self.validate_airflow_tasks_run_command(command)  # type: 
ignore[attr-defined]
+

Review Comment:
   Sorry, this is not good. The failure of tests in 
https://github.com/apache/airflow/actions/runs/16641791391/job/47152038655?pr=53927
 was caused by an error in the test as you pass 
`executor.execute_async(key=key, command=["new", "command"])` in 
https://github.com/apache/airflow/pull/53927/files#diff-a195d35658cf228806ec7f8f959fc1a6dcdb67b8f2d1de6183289635a91ee72aR371
 which is not a valid airflow task command. As the error in pytests points to 
`ValueError: The command must start with ["airflow", "tasks", "run"].` you need 
to pass a command in the pytest which is compatible to airflow task executions.
   
   You should not change the validation behaviro for tasks in 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