jason810496 commented on issue #46978:
URL: https://github.com/apache/airflow/issues/46978#issuecomment-2677349327

   Hi @jedcunningham,
   I think we could introduce a `CliDefinitionLoader` class, following the same 
approach as `ExecutorLoader`.  
   
   Currently, only `AuthManager.get_cli_commands()` and 
`Executor.get_cli_commands()` are called and extended in `cli_parser`:  
   
https://github.com/apache/airflow/blob/4c031cb855f455c94eb91c6be3adeec638a9d3d7/airflow/cli/cli_parser.py#L39-L87
  
   
   By introducing `CliDefinitionLoader`, we can extend `cli_parser` to support 
provider module-level CLI commands. Here is a rough POC of 
`CliDefinitionLoader`: 
https://github.com/apache/airflow/compare/main...jason810496:airflow:refactor/add-cli-definition-loader-poc?expand=1
   
   Additionally, as a next step, we could decouple the `get_cli_commands` 
method from both `Executor` and `AuthManager`. This would address the root 
cause of the current CLI slowdown and potentially improve CLI performance by 
3–4x, as shown in the benchmark: 
https://github.com/apache/airflow/issues/46789.  
   
   Would love to hear your thoughts on this approach!


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