You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2026/01/09 10:13:58 UTC

Re: [PR] Fix connection test API to restore masked password/extra from existing connections [airflow]

pierrejeambrun commented on code in PR #59643:
URL: https://github.com/apache/airflow/pull/59643#discussion_r2675609645


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:
##########
@@ -234,6 +243,23 @@ def test_connection(
     try:
         data = test_body.model_dump(by_alias=True)
         data["conn_id"] = transient_conn_id
+
+        if use_existing_credentials:
+            try:
+                existing_conn = Connection.get_connection_from_secrets(test_body.connection_id)

Review Comment:
   The API operates for now only on DB connections (delete, patch, etc...). I would keep it consistent and only do a 'db' call there to keep things simple. 
   
   Then if we want to be able to do  a secret backend lookup, I would do that in a follow up PR if needed. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org