-
Notifications
You must be signed in to change notification settings - Fork 287
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
zabbix_template: Fix the issue for the unicode strings doesn’t decode in python2 #322
Conversation
Codecov Report
@@ Coverage Diff @@
## main #322 +/- ##
==========================================
+ Coverage 77.20% 77.32% +0.12%
==========================================
Files 19 19
Lines 2685 2686 +1
Branches 689 690 +1
==========================================
+ Hits 2073 2077 +4
+ Misses 409 407 -2
+ Partials 203 202 -1
Continue to review full report at Codecov.
|
update comment update comment
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.
Looks ok to me
Thank you @D3DeFi for your review. |
@sky-joker I think that added integration test will not be able to detect the problem by itself as the bug will not prevent it from importing the template, rather would cause the string with I think this would require exporting the string via zabbix_template_info and comparing values between original template and result from export to be sure. |
Thank you @D3DeFi for your feedback. |
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.
Amazing! :)
Thank you for the fix @sky-joker . Now, the question is: do we want to release 1.2.1 with this? I feel like we should some how do that |
Thank you @D3DeFi for merging! @dj-wasabi |
Just for the completeness in this thread: As mentioned on Gitter, we skip 1.2.1 and go for 2.0.0 directly |
Thank you @D3DeFi for the follow. |
… in python2 (ansible-collections#322) * fix the issue for the unicode strings doesn’t decode in python2 * add the integration test for ansible-collections#314 * add changelog file * add the test for comparing the unicode ansible-collections#322 (comment)
SUMMARY
I added the codecs processing for decoding unicode in Python2 to the zabbix_template module previously.
#226
It turns out that this process also removes the necessary escape characters(slash) in Python2 and 3.
So, this PR will fix that issue.
fixes: #314
ISSUE TYPE
COMPONENT NAME
plugins/modules/zabbix_template.py
ADDITIONAL INFORMATION
tested on Zabbix 5.0