choo121600 commented on code in PR #59643:
URL: https://github.com/apache/airflow/pull/59643#discussion_r2678313282
##########
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:
As I understand it, for now it would be better to keep the API limited to DB
connections only to maintain consistency.
In that case, would it make more sense to change it to a direct DB lookup
like below, as I tried previously?
```py
existing_orm_conn = session.scalar(
select(Connection).where(Connection.conn_id ==
test_body.connection_id).limit(1)
)
```
--
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]