Uh oh!
There was an error while loading. Please reload this page.
Replace dill package to use cloudpickle - #38531
Conversation
VladaZakharova
commented
Mar 27, 2024
This is cool :). But: Certainy we will need to keep backwards-compatibility option (and I do not think dill should be I think this change needs a bit more:
This way we will:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
VladaZakharova
commented
Apr 3, 2024
Thank you @potiuk and @hussein-awala for your comments! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ae1f8be to
48ce74fComparepotiuk
commented
Apr 12, 2024
It shoudl not . @bolkedebruin -> i believe serde should be good for it and we should be able to do round-trip serialization of most types |
VladaZakharova
commented
Apr 16, 2024
Hi @bolkedebruin@potiuk ! |
potiuk
commented
Apr 16, 2024
I think if you have no confirmation from @bolkedebruin on the proposed path, the way to go is to implement POC and see if it works with the current executor configs @VladaZakharova. There is no better way to confirm the approach. |
@potiuk If we are talking about migration and changing the way we serialize, should we consider changing dill to use json? Are there some limitations here? By doing this, we can try to avoid the same problem in the future for other Python versions. WDYT? Also regarding the original issue with incorrect serialization for Python 3.11, is it a problem only with serialization or deserialization too? If we can use dill for Python 3.11 only for deserialization, and cloudpickle for serialization, is there will be a problem? @hussein-awala@Taragolis Can you give us some details here? Thanks! |
potiuk
commented
Apr 16, 2024
As mentioned before - we need to be able to handle different serializers - to handle the K8S configuration problem described above in #38531 (comment). This is the reason we have dill in the first place. If serde will not solve the problem (seems not) - then the solution with storing pickler together with serialized value seems to be good direction - providing that migration scenarios will be part of the solution of course. |
The Python 3.11 issue is really a "test" issue - I am not really sure if this has the effect in production. BTW. I think there is a little misunderstanding here. If the only reason for this change is supporting cloudpickle in Python Virtualenv Operato and not getting rid of dill, then we can likely leave Maybe I was assuming too much of a reason for that change when I was commending on dill used in the executor. And we can leave that part altogether - concentrating back on just Python Virtualenv Operator. |
f7c1d8b to
f22d1ddCompare@potiuk , |
f102d7b to
54eee08CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
potiuk
commented
Apr 18, 2024
Yes, sorry for the confusion - I think indeed we should limit that change to only that - all the complexity that replacing core executor config might still remain. It might not help with some dependency issues (I.e. dill will still be a core depenency) - but it will give the users a way to handle their pickling for PVO / External Python Operator better. |
moiseenkov
commented
Apr 19, 2024
@potiuk , hi |
potiuk
commented
Apr 19, 2024
yes. Python Operator and related are part of the Airflow core. |
moiseenkov
commented
Apr 19, 2024
Thank you! |
Related issue: #35307
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.