uplsh580 commented on code in PR #61036:
URL: https://github.com/apache/airflow/pull/61036#discussion_r2725430682


##########
airflow-core/src/airflow/utils/cli.py:
##########
@@ -436,6 +437,7 @@ def suppress_logs_and_warning(f: T) -> T:
     @functools.wraps(f)
     def _wrapper(*args, **kwargs):
         _check_cli_args(args)
+        os.environ["_AIRFLOW_PROCESS_CONTEXT"] = "server"

Review Comment:
   Query-type CLI commands (e.g., `dags list`) require the server context to 
successfully initialize DAG bundles that depend on database-stored connections. 
Providing the context here ensures consistent secret resolution via 
MetastoreBackend across all read-only administrative tools. This centralization 
also allows for the removal of redundant manual environment settings within 
individual command functions like `connections_get`.



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