You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test Connection API discards saved credentials (unmasks fails) for connection types without host/port (e.g. Snowflake) #72318
Clicking "Test" in the UI for a connection whose type doesn't use host/port
(e.g. snowflake) always fails with errors like:
The private_key_file path points to an empty or invalid file.
even when the connection is verified working via airflow connections test <conn_id> on the CLI, and the underlying
credentials/file are valid.
What you think should happen instead?
Test Connection should succeed using the already-saved connection's
credentials, same as the CLI airflow connections test command does.
Operating System
rocky9.4
Deployment
Docker-Compose
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
Not using the official Airflow Docker image. Custom container running
scheduler, api-server, dag-processor, triggerer, and an Edge Executor
worker as separate daemonized processes inside a single container
(MySQL as the metadata DB, running under Rosetta emulation on Apple
Silicon). No modifications to Airflow's own source/behavior beyond
standard pip-installed apache-airflow-core==3.3.1.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
I was reviewing the issue you reported and ran some tests. From what I gather, the CLI works because it uses the database credentials directly; however, when performing the operation via the UI, the system compares the UI's port and host settings with those in the database to decide whether to merge the password fields or the additional fields.
The value in the database is NULL (which Python stores as None), but the UI sends a JSON object containing an empty string (""), causing the comparison to fail.
As a result, the merge does not occur, and the hook receives "***" for the private_key_file field, triggering the error: The private_key_file path points to an empty or invalid file.
In this section of code:
if ("host"infields_setandtest_body.host!=existing_conn.host) or ("port"infields_setandtest_body.port!=existing_conn.port):
I will run a few more tests, and then we can discuss a solution.
Activity
boring-cyborg commentedon Aug 31, 2026
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Pedrinhonitz commentedon Aug 31, 2026
Hello,
Thank you for your contribution.
I was reviewing the issue you reported and ran some tests. From what I gather, the CLI works because it uses the database credentials directly; however, when performing the operation via the UI, the system compares the UI's port and host settings with those in the database to decide whether to merge the password fields or the additional fields.
The value in the database is
NULL(which Python stores asNone), but the UI sends a JSON object containing an empty string (""), causing the comparison to fail.As a result, the merge does not occur, and the hook receives
"***"for theprivate_key_filefield, triggering the error:The private_key_file path points to an empty or invalid file.In this section of code:
I will run a few more tests, and then we can discuss a solution.
Merge pull request #1 from Pedrinhonitz/fix/test-connection-api-72318
fix ui connection test with null host and port (#72348)
[v3-3-test] fix ui connection test with null host and port (#72348) (#…
fix ui connection test with null host and port (apache#72348)