o-nikolas commented on code in PR #29055:
URL: https://github.com/apache/airflow/pull/29055#discussion_r1278063529
##########
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:
Ah, actually, after reviewing this I'm realizing I actually already solved
this by using `log.exception`. That includes the exception message along with
the log message. So I think we're all good on that front.
But I'll add a bit more info to the following message I display to have some
info about celery/kubernetes
@potiuk
--
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]