amoghrajesh commented on code in PR #57853:
URL: https://github.com/apache/airflow/pull/57853#discussion_r2533402471


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1862,10 +1878,39 @@ def _is_excluded(cls, var: Any, attrname: str, op: 
DAGNode):
         # Check if value matches client_defaults (hierarchical defaults 
optimization)
         if cls._matches_client_defaults(var, attrname):
             return True
-        schema_defaults = cls.get_schema_defaults("operator")
 
+        # for const fields, we should always be excluded when False, 
regardless of client_defaults
+        # Use class-level cache for optimisation
+        if not hasattr(cls, "_const_fields"):
+            cls._const_fields = cls.get_operator_const_fields()

Review Comment:
   Pushed here: [suggestions from 
ephraim](https://github.com/apache/airflow/pull/57853/commits/ccedbb8808fd2a289e2e0ca30b1dba29b47fdff4)



-- 
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]

Reply via email to