-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: log action get the correct request body #45546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIce.
Small nits before merging, but looking good.
Thank you for the suggestion. Please check the latest commit. |
Backport failed to create: v2-10-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker bae4bb1 v2-10-test This should apply the commit to the v2-10-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
(cherry picked from commit bae4bb1)
cherry pick PR here: |
This was merged without letting tests pass somehow. We have removed the `root_dag` argument in Airflow 3.
* fix: log action get the correct request body (#45546) (cherry picked from commit bae4bb1) * Fix log_action decorator when content type is None (#45567) (cherry picked from commit 46304d8) --------- Co-authored-by: luoyuliuyin <[email protected]> Co-authored-by: Daniel Standish <[email protected]>
This was merged without letting tests pass somehow. We have removed the `root_dag` argument in Airflow 3.
This was merged without letting tests pass somehow. We have removed the `root_dag` argument in Airflow 3.
This was merged without letting tests pass somehow. We have removed the `root_dag` argument in Airflow 3.
This was merged without letting tests pass somehow. We have removed the `root_dag` argument in Airflow 3.
Apache Airflow version
main (development)
How to reproduce
POST request with
content-type
asapplication/json; charset=utf-8
Problem Description
When an API call is made, if the API has the
@action_logging
annotation, the event will be recorded in the dblog
table as followsRelated Code
Currently, whether the current request contains json_body is determined by judging whether
request.headers.get("content-type")
is equal toapplication/json
. The relevant code is as followsBut in many cases, the
content-type
contains other information besidesapplication/json
, such asapplication/json; charset=utf-8
. In this case, the database will not record valid information.Solution
So the judgment condition should be changed to include