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/09/07 06:31:28 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #26191: Fix faulty executor config serialization logic

uranusjr commented on code in PR #26191:
URL: https://github.com/apache/airflow/pull/26191#discussion_r964433220


##########
airflow/utils/sqlalchemy.py:
##########
@@ -166,9 +166,10 @@ def bind_processor(self, dialect):
         super_process = super().bind_processor(dialect)
 
         def process(value):
-            if isinstance(value, dict) and 'pod_override' in value:
-                value['pod_override'] = BaseSerialization()._serialize(value['pod_override'])
-            return super_process(value)
+            val_copy = copy.copy(value)
+            if isinstance(val_copy, dict) and 'pod_override' in val_copy:
+                val_copy['pod_override'] = BaseSerialization._serialize(val_copy['pod_override'])

Review Comment:
   Would it be more reliable to check for `__type` and `__var` instead? (We could have that logic in `serialized_objects` instead as a `is_serialized` function)



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