Skip to content
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

Clean up webserver endpoints adding to audit log #37580

Merged
merged 5 commits into from Feb 23, 2024

Conversation

bbovenzi
Copy link
Contributor

@bbovenzi bbovenzi commented Feb 21, 2024

Only log webserver events that are CRUD actions. View-only endpoints shouldn't be logged. Therefore we don't need any default excluded events.

Removed a few other unused decorators, mostly on on redirect functions.


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

@bbovenzi bbovenzi added this to the Airflow 2.9.0 milestone Feb 21, 2024
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Feb 21, 2024
Copy link
Contributor

@dstandish dstandish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

airflow/www/views.py Outdated Show resolved Hide resolved
@jedcunningham
Copy link
Member

Looks like there might be a couple test failures from this change.

@uranusjr
Copy link
Member

Specifically test_action_logging_get_legacy_view seems directly relevant.

@bbovenzi
Copy link
Contributor Author

Specifically test_action_logging_get_legacy_view seems directly relevant.

Fixed. Removed two unneeded tests and added a test for robots.txt

@bbovenzi
Copy link
Contributor Author

@jedcunningham For some reason test_user_defined_filter_and_macros_raise_error is failing, but it doesn't failed if GET rendered-templates still has @action_logging...

@bbovenzi bbovenzi merged commit d663d8b into apache:main Feb 23, 2024
59 checks passed
@bbovenzi bbovenzi deleted the fix-webserver-logging branch February 23, 2024 06:04
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
* Clean up webserver endpoints adding to audit log

* Remove all view-only action logging and change excluded events list

* Restore robots logging

* Remove two extra loggings+tests, add test for robots.txt

* Fix rendered template test
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Mar 6, 2024
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Apr 22, 2024
* Clean up webserver endpoints adding to audit log

* Remove all view-only action logging and change excluded events list

* Restore robots logging

* Remove two extra loggings+tests, add test for robots.txt

* Fix rendered template test
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:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants