kaxil commented on code in PR #54569:
URL: https://github.com/apache/airflow/pull/54569#discussion_r2292590094
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1660,13 +1730,34 @@ def detect_dependencies(cls, op: SdkOperator) ->
set[DagDependency]:
@classmethod
def _is_excluded(cls, var: Any, attrname: str, op: DAGNode):
+ """
+ Determine if a variable is excluded from the serialized object.
+
+ :param var: The value to check. [var == getattr(op, attrname)]
+ :param attrname: The name of the attribute to check.
+ :param op: The operator to check.
+ :return: True if a variable is excluded, False otherwise.
+ """
+ schema_defaults = cls.get_operator_defaults_from_schema()
+
+ if attrname in schema_defaults:
Review Comment:
`if not var:` can not be used since it would also exclude `False`, `0` or
`""`empty string
--
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]