Skip to content

Conversation

@dstandish
Copy link
Contributor

@dstandish dstandish commented May 8, 2025

This PR makes it so dag_maker always creates serialized dag and dagversion objects, along with dag model.

It's not really sensible anymore to not have these other objects there; they are always there in production, and increasingly we need them there for code to work right, and their omission can leave some bugs hidden (and some of them are resolved as part of this).

Initially, I was going to just remove the option, but, it also controls the type of dag object returned by dag_maker (serdag vs dag), so for now I leave that as is.

Copy link
Contributor

@ephraimbuddy ephraimbuddy left a comment

Choose a reason for hiding this comment

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

I worked on making it backwards compatible here: https://github.com/apache/airflow/pull/46703/files#diff-b666e1a99da023285548b78cbdf107890577203173a6ab31fb0722491ed1b280.

You might want to take a look

@dstandish
Copy link
Contributor Author

I worked on making it backwards compatible here: https://github.com/apache/airflow/pull/46703/files#diff-b666e1a99da023285548b78cbdf107890577203173a6ab31fb0722491ed1b280.

You might want to take a look

Sorry, making what backward compatible?

@ephraimbuddy
Copy link
Contributor

I worked on making it backwards compatible here: https://github.com/apache/airflow/pull/46703/files#diff-b666e1a99da023285548b78cbdf107890577203173a6ab31fb0722491ed1b280.
You might want to take a look

Sorry, making what backward compatible?

Like still allowing the use of non-serialized for airflow 2

@dstandish dstandish force-pushed the always-create-serdag-in-dagmaker branch from 1fdbbfd to d3c08d7 Compare May 9, 2025 14:22
@dstandish dstandish added the full tests needed We need to run full set of tests for this PR to merge label May 9, 2025
@dstandish dstandish force-pushed the always-create-serdag-in-dagmaker branch from dfedfb2 to 6e015d9 Compare May 9, 2025 21:12
@dstandish dstandish force-pushed the always-create-serdag-in-dagmaker branch from 7581992 to 802fc6d Compare May 13, 2025 20:16
dstandish and others added 12 commits May 14, 2025 07:03
The serializaed trigger must be JSON-compatible to be stored in the
database, so we may need to run it through BaseSerialization.

I added some extra code so the serialization is done at a minimum, and
not shown to the user if possible.
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@dstandish dstandish force-pushed the always-create-serdag-in-dagmaker branch from 8a8b4d2 to df4f242 Compare May 14, 2025 14:03
@dstandish dstandish merged commit 229d1b2 into apache:main May 14, 2025
93 of 94 checks passed
@dstandish dstandish deleted the always-create-serdag-in-dagmaker branch May 14, 2025 14:59
@dstandish dstandish added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label May 21, 2025
github-actions bot pushed a commit that referenced this pull request May 21, 2025
This PR makes it so dag_maker always creates serialized dag and dagversion objects, along with dag model.

It's not really sensible anymore to not have these other objects there; they are always there in production, and increasingly we need them there for code to work right, and their omission can leave some bugs hidden (and some of them are resolved as part of this).

Initially, I was going to just remove the option, but, it also controls the type of dag object returned by dag_maker (serdag vs dag), so for now I leave that as is.

---------
(cherry picked from commit 229d1b2)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@github-actions
Copy link

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

dstandish added a commit that referenced this pull request May 21, 2025
This PR makes it so dag_maker always creates serialized dag and dagversion objects, along with dag model.

It's not really sensible anymore to not have these other objects there; they are always there in production, and increasingly we need them there for code to work right, and their omission can leave some bugs hidden (and some of them are resolved as part of this).

Initially, I was going to just remove the option, but, it also controls the type of dag object returned by dag_maker (serdag vs dag), so for now I leave that as is.

---------
(cherry picked from commit 229d1b2)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
kaxil pushed a commit that referenced this pull request Jun 3, 2025
This PR makes it so dag_maker always creates serialized dag and dagversion objects, along with dag model.

It's not really sensible anymore to not have these other objects there; they are always there in production, and increasingly we need them there for code to work right, and their omission can leave some bugs hidden (and some of them are resolved as part of this).

Initially, I was going to just remove the option, but, it also controls the type of dag object returned by dag_maker (serdag vs dag), so for now I leave that as is.

---------
(cherry picked from commit 229d1b2)

Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
This PR makes it so dag_maker always creates serialized dag and dagversion objects, along with dag model.

It's not really sensible anymore to not have these other objects there; they are always there in production, and increasingly we need them there for code to work right, and their omission can leave some bugs hidden (and some of them are resolved as part of this).

Initially, I was going to just remove the option, but, it also controls the type of dag object returned by dag_maker (serdag vs dag), so for now I leave that as is.

---------

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@@ -230,12 +230,26 @@ def __str__(self) -> str:


def _encode_trigger(trigger: BaseEventTrigger | dict):
Copy link
Member

Choose a reason for hiding this comment

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

The changes in this PR potentially caused regression: #51809

Mis-leading PR title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants