Skip to content

Conversation

@anishgirianish
Copy link
Contributor

@anishgirianish anishgirianish commented Dec 30, 2025


This PR fixes the /connections/test route in Airflow v3 to handle masked passwords correctly and ensures DBT hooks test connections without errors.

What/Why

  • Use stored password for saved connections instead of the masked "***".
  • If the connection is not saved, create a transient in-memory connection from the request body.
  • Fix DBT hook to use the correct connection URL during testing and avoid 400 errors.

How

  • Fetch the connection from the DB if connection_id is provided; otherwise, create a transient connection.
  • Added unit tests to cover saved and transient connections.
  • Updated dbt hook to use correct url

Impact

  • Fixes saved and transient connection testing failures and resolves DBT hook 400 errors.
  • Earlier versions are also affected and will require separate backports or PRs. The issue is specifically reported in 2.x version

closes: #58941
related: #58941


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dbt-cloud test_connection giving 400 response code

1 participant