FrankYang0529 commented on code in PR #74916:
URL: https://github.com/apache/airflow/pull/74916#discussion_r4344247728
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1222,6 +1222,8 @@ def populate_operator(
v = cls.deserialize(v)
elif k == "_on_failure_fail_dagrun":
k = "on_failure_fail_dagrun"
+ elif k == "_on_success_succeed_dagrun":
+ k = "on_success_succeed_dagrun"
Review Comment:
nit: the `elif k == "_on_success_succeed_dagrun"` branch never runs.
`_on_success_succeed_dagrun` is not in `op.get_serialized_fields()`, so the
earlier `k not in op.get_serialized_fields()` branch handles the key first.
Whether this `elif` branch is needed depends on how the fix for
`.expand().as_teardown(...)` in
https://github.com/apache/airflow/pull/74916#discussion_r4305977141 is written.
If that fix stores the `on_success_succeed_dagrun` flag in `partial_kwargs`,
this branch stays unused. If that fix instead writes
`_on_success_succeed_dagrun` as a top-level key of mapped tasks, this branch is
needed. In that case, `_on_success_succeed_dagrun` must also be added to
`SerializedMappedOperator.get_serialized_fields()`. Otherwise the earlier `k
not in op.get_serialized_fields()` branch still takes the
`_on_success_succeed_dagrun` key first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]