-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add database cleanup cronjob to clean old records #58155
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
Conversation
jscheffl
left a comment
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.
Looks good in my view. Static check failure is from another problem on main, seems unrelated to this PR.
Keeping this PR open a few days in other leaving a second pass review.
baa8d50 to
8281c58
Compare
|
Thanks for the review @jscheffl |
96a1dec to
54adf9f
Compare
|
Tests, linting should be fixed now, sorry! |
d8bdeb4 to
a5fe26e
Compare
a5fe26e to
42bac90
Compare
jedcunningham
left a comment
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! Thanks for the PR. Noticed a few minor things.
chart/templates/database-cleanup/database-cleanup-serviceaccount.yaml
Outdated
Show resolved
Hide resolved
helm-tests/tests/helm_tests/airflow_aux/test_database_cleanup_pods.py
Outdated
Show resolved
Hide resolved
helm-tests/tests/helm_tests/airflow_aux/test_database_cleanup_pods.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
…pods.py Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
…pods.py Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
# Conflicts: # helm-tests/tests/helm_tests/security/test_scc_rolebinding.py
|
thanks for the review @jedcunningham. I will open a PR for some changes with cleanup cronjob and also add this #58155 (comment) change too |
|
Thanks @rcampos87! |
This PR creates a new database clean up cronjob that runs
airflow db clean, it runs by default every week, specified byschedule, and deletes records on the metadata db before X days, specified byretentionDays.This will be helpful to those who want to keep the metadata db lean and dont want to go the extra length and setup a manual cronjob.
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.