dstandish commented on code in PR #26192:
URL: https://github.com/apache/airflow/pull/26192#discussion_r964449420


##########
airflow/serialization/enums.py:
##########
@@ -50,3 +50,4 @@ class DagAttributeTypes(str, Enum):
     PARAM = 'param'
     XCOM_REF = 'xcomref'
     DATASET = 'dataset'
+    ENCODING_ENUM = '__encoding_enum__'

Review Comment:
   Well, we're probably not going to implement this anyway so maybe moot.... 
but here's why....
   
   the only time this is used is for serializing an already-serialized object.
   
   that means serializing a dict whos keys are the special Encoding enum.  the 
tricky thing is we can't just encode these keys in the normal way, because that 
would mean replacing the string key with a dictionary, and a dictionary is not 
hashable and can't be used as a key in a dict.  we can't make it a tuple either 
because a tuple as a dict key is not json-serializable.  so we have to make it 
a string prefix.  so, we could have done `encoding-__var` but... when we 
deserialize, we're looking for that prefix... with `encoding-` as the prefix, 
it seems we'd get a lot more false positives than with `__encoding_enum__`  
.... i guess `__encoding__` would be fine if that's what you're suggesting....  
i dunno wdyt?



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