Skip to content

Bind engine before attempting to drop archive tables#33622

Merged
potiuk merged 1 commit into
apache:mainfrom
SamWheating:sw-fix-db-cleanup
Aug 23, 2023
Merged

Bind engine before attempting to drop archive tables#33622
potiuk merged 1 commit into
apache:mainfrom
SamWheating:sw-fix-db-cleanup

Conversation

@SamWheating

Copy link
Copy Markdown
Contributor

closes: #33606

It looks like we weren't properly binding the engine to the table object before attempting to drop it, and as a result SQLalchemy was throwing exceptions. The only tests which actually run the db cleanup had set skip_archive=False so this went through undetected.

Anyways, added a test to replicate the issue and then fixed it.

@eladkal eladkal added this to the Airflow 2.7.1 milestone Aug 22, 2023
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Aug 22, 2023
@potiuk
potiuk merged commit 911cf46 into apache:main Aug 23, 2023
@potiuk

potiuk commented Aug 23, 2023

Copy link
Copy Markdown
Member

Thanks @SamWheating !

ephraimbuddy pushed a commit that referenced this pull request Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'airflow db clean' with --skip-archive flag fails

3 participants