You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/14 20:48:58 UTC

[GitHub] [airflow] ashb commented on a change in pull request #21445: [de]serialize resources on task correctly

ashb commented on a change in pull request #21445:
URL: https://github.com/apache/airflow/pull/21445#discussion_r806227197



##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -707,6 +710,9 @@ def deserialize_operator(cls, encoded_op: Dict[str, Any]) -> Union[BaseOperator,
                 v = cls._deserialize_timedelta(v)
             elif k in encoded_op["template_fields"]:
                 pass
+            elif k == "resources" and Resources.is_operator_resources_json_string(v):

Review comment:
       Can you explain why this` is_...()` function  is needed? It's not a pattern we have elsewhere in serialization.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org