Skip to content

Clean up webserver endpoints adding to audit log#37580

Merged
bbovenzi merged 5 commits into
apache:mainfrom
astronomer:fix-webserver-logging
Feb 23, 2024
Merged

Clean up webserver endpoints adding to audit log#37580
bbovenzi merged 5 commits into
apache:mainfrom
astronomer:fix-webserver-logging

Conversation

@bbovenzi

@bbovenzi bbovenzi commented Feb 21, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread airflow/config_templates/config.yml Outdated

@dstandish dstandish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread airflow/www/views.py Outdated
@jedcunningham

Copy link
Copy Markdown
Member

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

@uranusjr

Copy link
Copy Markdown
Member

Specifically test_action_logging_get_legacy_view seems directly relevant.

@bbovenzi

Copy link
Copy Markdown
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
Copy Markdown
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 force-pushed the fix-webserver-logging branch from 714975b to 2664251 Compare February 23, 2024 04:40
@bbovenzi bbovenzi merged commit d663d8b into apache:main Feb 23, 2024
@bbovenzi bbovenzi deleted the fix-webserver-logging branch February 23, 2024 06:04
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Mar 6, 2024
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.

8 participants