Skip to content

Swap connections_get CLI command to use Connection instead of BaseHook from sdk#53632

Merged
potiuk merged 1 commit intoapache:mainfrom
astronomer:swap-connection-get-to-use-connection
Jul 22, 2025
Merged

Swap connections_get CLI command to use Connection instead of BaseHook from sdk#53632
potiuk merged 1 commit intoapache:mainfrom
astronomer:swap-connection-get-to-use-connection

Conversation

@amoghrajesh
Copy link
Copy Markdown
Contributor

@amoghrajesh amoghrajesh commented Jul 22, 2025

The connections_get CLI command imports and uses basehook from sdk when there is no need to do so. It can just use the models.Connection as the utility will most likely not be used on worker.

This cuts down a tie between task SDK & core and also removed an unwanted mock_supervisor_comms usage in tests. Core tests shouldn't need that.

If a worker backend is set up, when the connections module moved to using task sdk connection, that will be handled in bulk.


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

@amoghrajesh amoghrajesh changed the title Swap connections_get CLI command to use Connection instead of BaseHoo… Swap connections_get CLI command to use Connection instead of BaseHook from sdk Jul 22, 2025
@amoghrajesh amoghrajesh requested review from ashb and kaxil July 22, 2025 12:56
@amoghrajesh amoghrajesh added this to the Airflow 3.1.0 milestone Jul 22, 2025
@potiuk potiuk merged commit 9772b30 into apache:main Jul 22, 2025
58 checks passed
kyungjunleeme pushed a commit to kyungjunleeme/airflow that referenced this pull request Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants