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


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:
##########
@@ -234,6 +237,21 @@ def test_connection(
     try:
         data = test_body.model_dump(by_alias=True)
         data["conn_id"] = transient_conn_id
+
+        existing_conn = session.scalar(

Review Comment:
   Should not we use `Connection.get_connection_from_secrets` ? -> this is the 
"canonical" (even if badly named) way of retrieving connection. We should not 
read the connections directly from the database, because the connections might 
be defined in secrets?
   
   Surely you won't be able to run those connections via UI, but since this is 
an API call, it should still handle running "/test" API with the conn_id that 
is defined in secrets.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to