You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "bugraoz93 (via GitHub)" <gi...@apache.org> on 2025/01/02 18:41:21 UTC
[PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
bugraoz93 opened a new pull request, #45363:
URL: https://github.com/apache/airflow/pull/45363
closes: #45302
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
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 [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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
Re: [PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #45363:
URL: https://github.com/apache/airflow/pull/45363#discussion_r1904771454
##########
tests/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -796,3 +796,10 @@ def test_should_respond_403_by_default(self, test_client, body):
"detail": "Testing connections is disabled in Airflow configuration. "
"Contact your deployment admin to enable it."
}
+
+
+class TestCreateDefaultConnections(TestConnectionEndpoint):
+ def test_should_respond_204(self, test_client):
+ response = test_client.post("/public/connections/defaults")
+ assert response.status_code == 204
+ assert response.content == b""
Review Comment:
Nice point, included. Thanks!
--
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
Re: [PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #45363:
URL: https://github.com/apache/airflow/pull/45363
--
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
Re: [PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #45363:
URL: https://github.com/apache/airflow/pull/45363#discussion_r1904334383
##########
tests/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -796,3 +796,10 @@ def test_should_respond_403_by_default(self, test_client, body):
"detail": "Testing connections is disabled in Airflow configuration. "
"Contact your deployment admin to enable it."
}
+
+
+class TestCreateDefaultConnections(TestConnectionEndpoint):
+ def test_should_respond_204(self, test_client):
+ response = test_client.post("/public/connections/defaults")
+ assert response.status_code == 204
+ assert response.content == b""
Review Comment:
Maybe mock `db_create_default_connections` and assert it has been called 1 time. Just to be sure that the endpoint is actually doing something.
--
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
Re: [PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #45363:
URL: https://github.com/apache/airflow/pull/45363#issuecomment-2574166923
> One small improvement for the test, but looking good.
Thanks for the review!
--
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
Re: [PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #45363:
URL: https://github.com/apache/airflow/pull/45363#issuecomment-2575788950
Re-running failed job that seem unrelated.
--
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
Re: [PR] AIP-81 Implement Create Default Connections Endpoint in REST API (FastAPI) [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #45363:
URL: https://github.com/apache/airflow/pull/45363#issuecomment-2577309230
Weird, failure persists. Rebasing the branch. 🤞
--
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