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


##########
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:
   @jscheffl  Thanks for the clarification!
   
   I’ve updated the test case to use a valid Airflow task command (starting 
with ["airflow", "tasks", "run"]) and removed the conditional check around 
validate_airflow_tasks_run_command. The validation now behaves consistently as 
intended.
   
   Let me know if there’s anything else you'd like me to address.



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