Skip to content

Refactor SerializedDagModel and DagCode for dag versioning - #43821

Merged
ephraimbuddy merged 5 commits into
apache:mainfrom
astronomer:versioning-refactor
Nov 16, 2024
Merged

ephraimbuddy merged 5 commits into
apache:mainfrom
astronomer:versioning-refactor

Conversation

@ephraimbuddy

Copy link
Copy Markdown
Contributor

Now that we have dag versioning, the SerializedDagModel and DagCode objects should no longer be deleted. Deletion should start with the DagModel, which will cascade to the DagVersion, then to the DagCode and SerializedDagModel.

Also, these models are no longer updated. Instead, a new object is added; hence, the last_updated is changed to created_at.

Comment thread airflow/dag_processing/manager.py Resolved

@uranusjr uranusjr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One suggestion on docstring, otherwise lgtm.

Now that we have dag versioning, the SerializedDagModel and
DagCode objects should no longer be deleted. Deletion should
start with the DagModel, which will cascade to the DagVersion,
then to the DagCode and SerializedDagModel.

Also, these models are no longer updated. Instead, a new
object is added; hence, the last_updated is changed to created_at.
@ephraimbuddy
ephraimbuddy merged commit 2db0d11 into apache:main Nov 16, 2024
@ephraimbuddy
ephraimbuddy deleted the versioning-refactor branch November 16, 2024 05:28
kandharvishnu pushed a commit to kandharvishnu/airflow that referenced this pull request Nov 19, 2024
)

* Refactor SerializedDagModel and DagCode for dag versioning

Now that we have dag versioning, the SerializedDagModel and
DagCode objects should no longer be deleted. Deletion should
start with the DagModel, which will cascade to the DagVersion,
then to the DagCode and SerializedDagModel.

Also, these models are no longer updated. Instead, a new
object is added; hence, the last_updated is changed to created_at.

* fixup! Refactor SerializedDagModel and DagCode for dag versioning

* fixup! fixup! Refactor SerializedDagModel and DagCode for dag versioning

* update rpc test since remove_deleted_dag has been removed

* Apply suggestions from code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants