kaxil commented on a change in pull request #16633:
URL: https://github.com/apache/airflow/pull/16633#discussion_r664544616



##########
File path: tests/serialization/test_dag_serialization.py
##########
@@ -861,6 +892,30 @@ def __init__(self, do_xcom_push=False, **kwargs):
 
         assert serialized_op.do_xcom_push is False
 
+    def test_operator_custom_serialized_fields_present(self):
+        class MyOperator(BaseOperator):
+            __serialized_fields: Optional[frozenset] = None
+
+            def __init__(self, a_dictionary_value: Dict, **kwargs):
+                super().__init__(**kwargs)
+                self.a_dictionary_value = a_dictionary_value

Review comment:
       We already cover a bit of that, by checking `BashOperator`  in `def 
make_simple_dag` in `tests/serialization/test_dag_serialization.py` adds a 
template_field (`bash_command`) and we test that it is added in serialized json.
   
   It was added in 
https://github.com/apache/airflow/pull/7633/files#diff-bb7c036c775e66eeef50932e062fbfc3
   
   I am curious to know if that address you use-case or if not what would be 
the reason to use DAG serialization in your specific case




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