oamg / leapp

Leapp - Application & OS Modernization Framework (For in-place upgrades, follow leapp-repository)
https://oamg.github.io/leapp/
Apache License 2.0
87 stars 70 forks source link

Fix store of answers on Python3.6 (DictProxy) #759

Closed pirat89 closed 2 years ago

pirat89 commented 2 years ago

On Python3 the loaded answer is "sometimes" represented by DictProxy object. In such a case the answer cannot be serialized into the JSON object and storing into the audit db fails with crash.

"sometimes" ==> I have a suspicion the result is different in case the answer is loaded from the answerfile and userchoices file.

See: https://github.com/oamg/leapp-repository/pull/821

Note: This is not a proper fix. I am sending the commit from a train with unstable network.

github-actions[bot] commented 2 years ago

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable. If you want to re-run tests or request review, you can use following commands as a comment:

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

centos-ci commented 2 years ago

Can one of the admins verify this patch?

fernflower commented 2 years ago

I'd say this is the proper fix https://github.com/oamg/leapp/pull/760

pirat89 commented 2 years ago

Closing it in favor of #760

btw, I am hitting it now in 100% cases on Py3 with dialogs. I have no idea how I passed through it earlier this day when the dialog has been raised. the object is DictProxy all the time the question is answered.