-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Fix process context for connections CLI to use Metastore secrets backend#59624
Fix process context for connections CLI to use Metastore secrets backend#59624potiuk merged 1 commit intoapache:mainfrom
Conversation
This PR fixes an issue where CLI commands for connections were not correctly setting the process context, which could lead to incorrect secrets backend detection.
The connections_get, connections_test commands were not setting _AIRFLOW_PROCESS_CONTEXT=server environment variable.
this environment variable is used by the secrets backend system to determine whether to use MetastoreBackend (server context) or other backends (client context).
Change
Added os.environ["_AIRFLOW_PROCESS_CONTEXT"] = "server" at the beginning of:
- connections_get()
- connections_test()
Before
After
related: #59298
This PR does not close the issue yet, but addresses part of the root cause.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.