-
Notifications
You must be signed in to change notification settings - Fork 227
(PDB-135) Improve and reduce the number of UTF-8 warnings #1640
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
(PDB-135) Improve and reduce the number of UTF-8 warnings #1640
Conversation
Refer to this link for build results (access rights to CI server needed): |
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.
should I see this getting logged with this catalog?
exec {"\u006E\u0303":
command => "/usr/bin/uptime"
}
exec {"\u00F1":
command => "/usr/bin/date"
}
I see this:
Warning: Ignoring invalid UTF-8 byte sequences in data to be sent to PuppetDB
in the puppet log, but no mention of replace catalog specifically.
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.
oh sorry, not on your code
+1 from me. functionality looks good. |
2efcd61
to
e109a6c
Compare
@ajroetker reworked collapse_ranges based on your feedback, should be good to go now |
Prior to this commit, any non-ASCII character found in a catalog would be replaced by /ufffd and a warning would be issued saying it found an invalid character. The code now takes into account the force_encoding done by to_pson and attempts to force_encode it back to UTF-8. For most cases this should be sufficient. There are times when binary data can appear in a catalog. In this case, we have characters that we can't represent in UTF-8. For this we continue to give users a warning. This warning now includes the command being submitted and the node the command is for. If users have debug logging enabled, context is given around where this bad character data occurred. Up to 100 characters before/after this bad data is included in the Puppet debug log.
e109a6c
to
d9ae1d7
Compare
Lgtm 👍 |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
…8-warning (PDB-135) Improve and reduce the number of UTF-8 warnings
Prior to this commit, any non-ASCII character found in a catalog would
be replaced by /ufffd and a warning would be issued saying it found an
invalid character. The code now takes into account the force_encoding
done by to_pson and attempts to force_encode it back to UTF-8. For most
cases this should be sufficient.
There are times when binary data can appear in a catalog. In this case,
we have characters that we can't represent in UTF-8. For this we
continue to give users a warning. This warning now includes the command
being submitted and the node the command is for. If users have debug
logging enabled, context is given around where this bad character data
occurred. Up to 100 characters before/after this bad data is included in
the Puppet debug log.