dstandish commented on code in PR #26191:
URL: https://github.com/apache/airflow/pull/26191#discussion_r964505001
##########
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:
so the thing is, re 170, i see what you are suggesting. but the reason we
are checking specifically for pod_override here, is because we're not trying to
serialize any and all executor configs. in general, they are simply pickled.
but because of idiosyncrasies of the design of the k8s objects, it's safer to
essentially convert them to json before pickling , which in effect is what the
serializer does. basically, we just want to do this for k8s executor configs.
if we wanted to do for all configs, your suggestion makes complete sense.
--
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]