Skip to content

Allow dropping _xcom_archive table via CLI#44291

Merged
kaxil merged 2 commits intoapache:mainfrom
astronomer:drop-xcom-archive
Nov 22, 2024
Merged

Allow dropping _xcom_archive table via CLI#44291
kaxil merged 2 commits intoapache:mainfrom
astronomer:drop-xcom-archive

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Nov 22, 2024

This tables was created to not cause data loss (in #44166) when upgrading from AF 2 to AF 3 if a user had pickled values in XCom table.

  • Introduced ARCHIVED_TABLES_FROM_DB_MIGRATIONS to track tables created during database migrations, such as _xcom_archive.
  • Added _xcom_archive to the db cleanup config_list for handling its records based on timestamp.
  • Add support in airflow db drop-archived to drop _xcom_archive.

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

This tables was created to not cause data loss (in apache#44166) when upgrading from AF 2 to AF 3 if a user had pickled values in XCom table.

- Introduced `ARCHIVED_TABLES_FROM_DB_MIGRATIONS` to track tables created during database migrations, such as `_xcom_archive`.
- Added `_xcom_archive` to the db cleanup `config_list` for handling its records based on `timestamp`.
- Add support in `airflow db drop-archived` to drop `_xcom_archive`.
@kaxil kaxil merged commit d636499 into apache:main Nov 22, 2024
@kaxil kaxil deleted the drop-xcom-archive branch November 22, 2024 22:53
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
This tables was created to not cause data loss (in apache#44166) when upgrading from AF 2 to AF 3 if a user had pickled values in XCom table.

- Introduced `ARCHIVED_TABLES_FROM_DB_MIGRATIONS` to track tables created during database migrations, such as `_xcom_archive`.
- Added `_xcom_archive` to the db cleanup `config_list` for handling its records based on `timestamp`.
- Add support in `airflow db drop-archived` to drop `_xcom_archive`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants