msumit commented on a change in pull request #17100:
URL: https://github.com/apache/airflow/pull/17100#discussion_r691753057
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -789,6 +825,27 @@ def from_dict(cls, serialized_obj: dict) ->
'SerializedDAG':
raise ValueError(f"Unsure how to deserialize version {ver!r}")
return cls.deserialize_dag(serialized_obj['dag'])
+ @classmethod
+ def _serialize_dag_params(cls, dag_params: Dict[str, Param]):
+ """ """
+ serialized_params = {}
+ for k, v in dag_params.items():
+ serialized_params[k] = v.__dict__
+ serialized_params[k].update({'__type':
f'{v.__class__.__module__}.{v.__class__.__name__}'})
+
+ return serialized_params
+
+ @classmethod
+ def _deserialize_dag_params(cls, encoded_dag_params: Dict) -> Dict[str,
Param]:
+ """ """
+ op_params = {}
+ for k, v in encoded_dag_params.items():
+ param_class = import_string(v['__type'])
Review comment:
We'll go ahead with option 1 for now and keep a TODO item for the 2nd
one.
--
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]