-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of remediations with non-ascii data #821
Conversation
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.
To launch regression testing public members of oamg organization can leave the following 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. |
3c0aec3
to
2f45be1
Compare
6034ffc
to
551ed30
Compare
/rerun |
4e4565a
to
960ed5e
Compare
/rerun 1052 |
Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/5830602 |
When a remediation command is printed that manipulates non-ascii but totally valid utf-8 strings, leapp should not give out any tracebacks upon report generation. The idea of a fix is to make repr implementation of Remediation aware of utf-8 encoding. The root of the problem is that a mixture of native text / encoded string can appear in a report message and that caused report generating code go crazy while creating actual log files. Unit test has been added as well. Related-to: OAMG-8629
960ed5e
to
e64add8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fernflower I am little bit afraid of japannese systems, but I hope they also use UTF-8 (e.g. Ja_jp.utf8
) instead of SJIS. I think it's still much better than before, so let's merge it and see if someone report problems in future about that. As UTF has been broken, SJIS has been broken too. So at least UTF should be covered now.
On Python2, the json.dumps library can produce either unicode or str output. Nowadays, the unicode is required, however in case the input for json.dumps function does not contain any unicode objects (e.g. when no report entry exists), it produces str type. Relates: oamg#821
On Python2, the json.dumps library can produce either unicode or str output. Nowadays, the unicode is required, however in case the input for json.dumps function does not contain any unicode objects (e.g. when no report entry exists), it produces str type. Relates: oamg#821
On Python2, the json.dumps library can produce either unicode or str output. Nowadays, the unicode is required, however in case the input for json.dumps function does not contain any unicode objects (e.g. when no report entry exists), it produces str type. Relates: #821
## Packaging - Provide leapp-framework 5.0 (oamg#818, oamg#840) ## Framework ### Fixes - Improve processing of reports with UTF-8 characters (oamg#821, oamg#828) - Fix info reporting with only one path to log (oamg#834) ### Enhancements - Include tracebacks of actors into the leapp.db (oamg#832) ## Leapp (tool) ### Fixes - Dialog creation fails not more for a component without choices (oamg#826) - Empty report is generated correctly (oamg#828) - Fix processing data in remediation instructions with non-ascii characters () ### Enhancements - Improve report summary output to make it more visible (oamg#818, oamg#840) ## stdlib ### Fixes - Fixed the call when the execute cannot be performed (oamg#836) ### Enhancements - changes related just to stdlib - under leapp/libraries/stdlib
## Packaging - Provide leapp-framework 5.0 (oamg#818, oamg#840) ## Framework ### Fixes - Improve processing of reports with UTF-8 characters (oamg#821, oamg#828) - Fix info reporting with only one path to log (oamg#834) ### Enhancements - Include tracebacks of actors into the leapp.db (oamg#832) ## Leapp (tool) ### Fixes - Dialog creation fails not more for a component without choices (oamg#826) - Empty report is generated correctly (oamg#828) - Fix processing data in remediation instructions with non-ascii characters () ### Enhancements - Improve report summary output to make it more visible (oamg#818, oamg#840) ## stdlib ### Fixes - Fixed the call when the execute cannot be performed (oamg#836) ### Enhancements - changes related just to stdlib - under leapp/libraries/stdlib
## Packaging - Provide leapp-framework 5.0 (#818, #840) ## Framework ### Fixes - Improve processing of reports with UTF-8 characters (#821, #828) - Fix info reporting with only one path to log (#834) ### Enhancements - Include tracebacks of actors into the leapp.db (#832) ## Leapp (tool) ### Fixes - Dialog creation fails not more for a component without choices (#826) - Empty report is generated correctly (#828) - Fix processing data in remediation instructions with non-ascii characters () ### Enhancements - Improve report summary output to make it more visible (#818, #840) ## stdlib ### Fixes - Fixed the call when the execute cannot be performed (#836) ### Enhancements - changes related just to stdlib - under leapp/libraries/stdlib
When a remediation command is printed that manipulates non-ascii but totally valid utf-8 filenames, leapp should not give out any tracebacks upon report generation.
Related-to: OAMG-8629