tirkarthi commented on code in PR #55116:
URL: https://github.com/apache/airflow/pull/55116#discussion_r2313867545
##########
airflow-core/src/airflow/api_fastapi/logging/decorators.py:
##########
@@ -98,6 +98,9 @@ async def log_action(
request_body = {}
masked_body_json = {}
+ if request_body.get("dry_run"):
Review Comment:
Sorry, I might be missing some context here regarding dry_run mode for API
server. Can you please explain with a scenario or endpoint here? The issue was
that frontend was using the same endpoint for actual clearing and also passing
`dry_run = True`. Hence passing `dry_run = True` to skip audit log was one
approach with other being a dedicated dry run only endpoint. Passing `dry_run`
in other payloads cause validation error as below since extra are not allowed.
<code>
Request : curl 'http://localhost:8000/api/v2/dags/example_params_trigger_ui'
-X PATCH -H 'Accept: application/json' -H 'Content-Type: application/json' -H
'Authorization: Bearer token --data-raw '{"is_paused":false, "dry_run": false}'
Response : {"detail":[{"type":"extra_forbidden","loc":["body","dry_run"],
"msg":"Extra inputs are not permitted","input":false}]}
</code>
--
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]