potiuk commented on code in PR #29055:
URL: https://github.com/apache/airflow/pull/29055#discussion_r1278259883


##########
airflow/cli/cli_parser.py:
##########
@@ -41,10 +42,23 @@
     core_commands,
 )
 from airflow.exceptions import AirflowException
+from airflow.executors.executor_loader import ExecutorLoader
 from airflow.utils.helpers import partition
 
 airflow_commands = core_commands
 
+log = logging.getLogger(__name__)
+try:
+    executor, _ = ExecutorLoader.import_default_executor_cls(validate=False)
+    airflow_commands.extend(executor.get_cli_commands())
+except Exception:
+    executor_name = ExecutorLoader.get_default_executor_name()
+    log.exception("Failed to load CLI commands from executor: %s", 
executor_name)
+    log.error("Ensure all dependencies are met and try again")

Review Comment:
   Yeah. That loooks cool. Even if ti is a bit ugly, this is a very good 
message to act on by the user (and if the user will create an issue - which 
will inevitably happen - "my command failed, what do I do" - we can simply 
respond -" just follow what is written in the message" and close such issue. 
(And I am not complaining, this is a fact of life that no matter what you do, 
some users will not read those error messages - but at least they will 
cop&paste it so that you can read it and ask the user to read it)l



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