-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Always create serdag in dagmaker fixture #50359
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
Always create serdag in dagmaker fixture #50359
Conversation
ephraimbuddy
left a comment
There was a problem hiding this 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
Sorry, making what backward compatible? |
Like still allowing the use of non-serialized for airflow 2 |
1fdbbfd to
d3c08d7
Compare
dfedfb2 to
6e015d9
Compare
7581992 to
802fc6d
Compare
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>
8a8b4d2 to
df4f242
Compare
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>
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>
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>
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): | |||
There was a problem hiding this comment.
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
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.