Skip to content
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

Missing trailing 'u' character in facts with hashes #567

Closed
yakatz opened this issue Apr 14, 2020 · 5 comments
Closed

Missing trailing 'u' character in facts with hashes #567

yakatz opened this issue Apr 14, 2020 · 5 comments
Labels

Comments

@yakatz
Copy link
Contributor

yakatz commented Apr 14, 2020

In an educational institution, we have a very large number of facts that end with .edu, but in puppetboard, all of them inside hashes show up as .ed . Running puppet facts on the systems show the correct value.

For example, fqdn is correct, but trusted['certname'] is missing the trailing u.

Puppetboard:
image

And in Chrome inspector:
image

@epackorigan
Copy link

epackorigan commented May 13, 2020

I see the same where os::name shows Ubunt for a lot of my machines. Same for os::id. operatingsystem is showing the correct value of Ubuntu.

@epackorigan
Copy link

It appears that there is code removing the u at the end of values here
I don't have enough context to understand why that code is doing this there.

@yakatz
Copy link
Contributor Author

yakatz commented May 14, 2020

Starting a string with u' in python means it is Unicode-encoded. I am not sure how I missed this in my searching. This replacement would probably need an anchor at the beginning, but I am not sure if that is enough. It would probably be better to have the back end code generate json to send to the frontend. I will see if I can work up a patch.

yakatz added a commit to yakatz/puppetboard that referenced this issue May 14, 2020
Possible partial fix for voxpupuli#567, but probably not the best choice
@gdubicki gdubicki added the bug label Nov 21, 2021
gdubicki added a commit that referenced this issue Nov 29, 2021
and extend the width of the fact values column in the node
view as the values are usually longer that the names.
Thus this implements #83.

Also fix getting nodes with non-string fact values (#612):
Examples:
* int (in this case the filtering did not occur at all
  and ALL results were returned),
* list of dict (here the filtering was not done and
  ZERO results were returned),

As showing fact values does not use the code that strips
trailing 'u' anymore, this also fixes #567.
@gdubicki
Copy link
Member

Fixed in v3.3.0 released today. Please check it out @yakatz . :)

@yakatz
Copy link
Contributor Author

yakatz commented Nov 29, 2021

Thanks. Resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants