Lee-W commented on code in PR #57853:
URL: https://github.com/apache/airflow/pull/57853#discussion_r2513138207


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1707,6 +1707,24 @@ def set_task_dag_references(task: SerializedOperator | 
MappedOperator, dag: Seri
             # Bypass set_upstream etc here - it does more than we want
             dag.task_dict[task_id].upstream_task_ids.add(task.task_id)
 
+    @classmethod
+    @lru_cache(maxsize=1)  # Only one type: "operator"

Review Comment:
   Just added `all version` for testing



##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1707,6 +1707,24 @@ def set_task_dag_references(task: SerializedOperator | 
MappedOperator, dag: Seri
             # Bypass set_upstream etc here - it does more than we want
             dag.task_dict[task_id].upstream_task_ids.add(task.task_id)
 
+    @classmethod
+    @lru_cache(maxsize=1)  # Only one type: "operator"
+    def get_operator_const_fields(cls) -> set[str]:
+        schema_loader = cls._json_schema
+
+        if schema_loader is None:
+            return set()

Review Comment:
   ```suggestion
           if (schema_loader := cls._json_schema) is None:
               return set()
   ```
   
   nit



##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1707,6 +1707,24 @@ def set_task_dag_references(task: SerializedOperator | 
MappedOperator, dag: Seri
             # Bypass set_upstream etc here - it does more than we want
             dag.task_dict[task_id].upstream_task_ids.add(task.task_id)
 
+    @classmethod
+    @lru_cache(maxsize=1)  # Only one type: "operator"

Review Comment:
   This might not work for 3.13
   
   reference https://github.com/apache/airflow/pull/57401/files



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