Skip to content

Conversation

@choo121600
Copy link
Member

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

Screenshot 2025-12-19 at 11 56 20 AM

After

image

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.

@potiuk potiuk merged commit caa81a7 into apache:main Dec 19, 2025
67 checks passed
@potiuk potiuk added this to the Airflow 3.1.6 milestone Dec 19, 2025
potiuk pushed a commit to potiuk/airflow that referenced this pull request Dec 19, 2025
(cherry picked from commit caa81a7)

Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
potiuk pushed a commit to potiuk/airflow that referenced this pull request Dec 19, 2025
(cherry picked from commit caa81a7)

Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
potiuk added a commit that referenced this pull request Dec 19, 2025
…9652)

(cherry picked from commit caa81a7)

Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
ephraimbuddy pushed a commit that referenced this pull request Jan 6, 2026
…9652)

(cherry picked from commit caa81a7)

Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants