uplsh580 commented on code in PR #61036:
URL: https://github.com/apache/airflow/pull/61036#discussion_r2725426309
##########
airflow-core/src/airflow/utils/cli.py:
##########
@@ -107,6 +107,7 @@ def wrapper(*args, **kwargs):
from airflow.configuration import conf
from airflow.utils.db import check_and_run_migrations,
synchronize_log_template
+ os.environ["_AIRFLOW_PROCESS_CONTEXT"] = "server"
Review Comment:
Setting the server context here ensures that state-changing or heavy CLI
commands (like `dag-processor`, `db migrate`, or `tasks run`) have the
necessary privileges to access database-backed secrets. This is particularly
crucial for commands like `airflow dag-processor -B,` where DAG bundle
validation occurs during the command's initialization phase, before the actual
Job runner starts.
--
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]