-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Don't rely on current ORM structure for db clean command #23574
Don't rely on current ORM structure for db clean command #23574
Conversation
1d2d2b8
to
715de70
Compare
4c8d325
to
43fdf83
Compare
84c2031
to
e1b4c49
Compare
c997019
to
6f4ac72
Compare
500df33
to
736d6cc
Compare
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. This will give the option to not access DB directly for the users in order to remove their error rows.
NIT. I think it's worth mentioning in the warning mesage printed in the UI when there are "erroneous" row, that the user can use the "db cleanup" command to delete them.
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
well it's just about purging old rows not necessarily erroneous rows... can you clarify which warning message? |
03e33a1
to
ee6908a
Compare
…le to use the command even when the metadatabase is not yet upgraded to the version of Airflow you have installed. Additionally we archive all rows before deletion.
…e up unexpected warnings
ee6908a
to
0760e6b
Compare
This one also fixes error raised in #25063 (bad recency column in "callback_request" table), so it should be cherry-picked to 2.3.4 IMHO. |
For command DB clean, by not relying on the ORM models, we will be able to use the command even when the metadatabase is not yet upgraded to the version of Airflow you have installed. Additionally we archive all rows before deletion. (cherry picked from commit 95bd6b7)
For command DB clean, by not relying on the ORM models, we can use db clean from 2.3 pre-upgrade.
Also, adds feature where the rows are always archived instead of simply deleted. (You can skip the archive with
--skip-archive
.)Example output with INFO log level:
Example with DEBUG log level: