Content-Length: 375030 | pFad | http://github.com/apache/airflow/pull/50922

65 Add soft-delete support and set dag_version FK on delete to SET NULL by sunank200 · Pull Request #50922 · apache/airflow · GitHub
Skip to content

Add soft-delete support and set dag_version FK on delete to SET NULL #50922

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sunank200
Copy link
Collaborator

@sunank200 sunank200 commented May 21, 2025

This PR introduces soft-delete for DAG versions and changes the foreign-key behaviour on task_instance.dag_version_id so that deleting a version no longer cascades, but instead sets the reference to NULL.

closes: #49580


^ 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 airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:db-migrations PRs with DB migration kind:documentation labels May 21, 2025
@sunank200 sunank200 force-pushed the delete-dag-version-records branch 2 times, most recently from 644ce09 to 0020deb Compare May 21, 2025 18:05
@sunank200 sunank200 requested a review from dstandish May 21, 2025 18:05
@sunank200 sunank200 force-pushed the delete-dag-version-records branch 2 times, most recently from 8e07a32 to 14a5876 Compare May 21, 2025 19:15
@sunank200 sunank200 marked this pull request as ready for review May 21, 2025 19:43
@sunank200 sunank200 force-pushed the delete-dag-version-records branch 2 times, most recently from 3ed69fc to e6947f5 Compare May 22, 2025 08:36
@sunank200 sunank200 requested review from uranusjr and Lee-W May 22, 2025 09:10
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

Overall looks good to me

@sunank200 sunank200 force-pushed the delete-dag-version-records branch from 445f8d9 to 8d042f3 Compare May 22, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:db-migrations PRs with DB migration kind:documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting dag version record deletes task instance record
3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/pull/50922

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy