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


##########
airflow/api_fastapi/core_api/routes/public/dag_parsing.py:
##########
@@ -40,6 +41,7 @@
     "",
     responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]),
     status_code=status.HTTP_201_CREATED,
+    dependencies=[Depends(action_logging())],

Review Comment:
   This wasn't here before (in the legacy api) but I guess it does not hurt to 
log that too.



##########
tests/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -208,6 +210,7 @@ def test_post_should_respond_201(self, test_client, 
session, body):
         assert response.status_code == 201
         connection = session.query(Connection).all()
         assert len(connection) == 1
+        _check_last_log(session, dag_id=None, event="post_connection", 
logical_date=None)

Review Comment:
   Same for `test_patch_should_response_200_redacted_password` 



##########
tests/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -208,6 +210,7 @@ def test_post_should_respond_201(self, test_client, 
session, body):
         assert response.status_code == 201
         connection = session.query(Connection).all()
         assert len(connection) == 1
+        _check_last_log(session, dag_id=None, event="post_connection", 
logical_date=None)

Review Comment:
   Here you should also add logs checking for 
`test_post_should_response_201_redacted_password` asserting that the `extra` 
part has redacted secrets. (password should not appear)



-- 
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