Skip to content

Conversation

@hussein-awala
Copy link
Member

closes: #34069

This PR adds action_logging decorator by default to add, edit and delete routes to all the views.

airflow=# select * from log order by dttm desc limit 2;
 id  |             dttm              | dag_id | task_id | map_index |      event       | execution_date |     owner      |                   extra                   
-----+-------------------------------+--------+---------+-----------+------------------+----------------+----------------+-------------------------------------------
 282 | 2023-09-04 21:56:07.115992+00 |        |         |           | delete           |                | Thor Adminstra | [('action', ''), ('pk', '3')]
 281 | 2023-09-04 21:56:04.389814+00 |        |         |           | action_muldelete |                | Thor Adminstra | [('action', 'muldelete'), ('rowid', '6')]

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Sep 4, 2023
@potiuk potiuk added this to the Airflow 2.7.2 milestone Sep 4, 2023
@hussein-awala
Copy link
Member Author

I found that these events are automatically loaded from method permissions dict, so I just added the missing ones:

airflow=# select * from log order by dttm desc limit 1;
 id  |             dttm              | dag_id | task_id | map_index |     event     | execution_date |     owner      |             extra             
-----+-------------------------------+--------+---------+-----------+---------------+----------------+----------------+-------------------------------
 329 | 2023-09-04 22:06:51.696354+00 |        |         |           | dagrun.delete |                | Thor Adminstra | [('action', ''), ('pk', '7')]
(1 row)

@uranusjr uranusjr merged commit 988632f into apache:main Sep 5, 2023
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Oct 3, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete record of dag run is not being logged in audit logs when clicking on delete button in list dag runs

4 participants