-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Structured facts display could be improved #83
Comments
PuppetDB doesn't store structured facts in any sane way so I'd have to start doing string parsing, loading it as JSON and deal with a whole bunch of edge cases and issues that can arise from there. Besides that it can be rather complex to get it right depending on how crazy people go with structured facts. That's a lot of work and very fragile code which I'm not willing to pull in. A design to store structured facts in PuppetDB and the API around it is going to be up soon for discussion. I'll chime in on that and make sure we get something that we can work with. Once that lands we can add support for it in Puppetboard in good and reliable way and correctly detect and differentiate between 'old' and structured facts. This would also affect other things like the ability to be able to query for a certain value out of a structured fact for example. It's a bit unfortunate that structured facts landed before PuppetDB could actually deal with them in a nice way but it is what it is. |
Fair enough. With Puppetboard relying heavily on PuppetDB's API and without sane support (PDB-28) in it I agree this is a slippery slope. |
I'm reopening this, just so that there is an issue about it and that people can find the rationale for it. I'll close it in due time through a commit once this gets fixed. |
Starting with PuppetDB 3.0 Structured facts are available in JSON format and new endpoints fact-paths, fact-contents and factsets are available. As @daenney said it is a lot of work to implement reliable browsing in PuppetBoard with both string and JSON type fact values. This will be on the backlog but if anybody really needs this support please submit a PR with a link to this issue. |
So Puppetboard has a It doesn't provide for a nice way to browse and click through it but will at least print it as more humanly readable JSON instead of a long string. |
We are open to PRs if anyone wants to attempt to implement an API for this. Hopefully it can make it into the 0.2.x series. |
As of PuppetDB 4.2.0 a new Inventory endpoint is being provided as well as "dotted query" syntax is made available, also the dot notation is experimental. It may be possible to make use of these new features in the 0.3.0 series with PuppetDB 5.0.0. |
* Version bump to 0.2.2 - Added an entry in CHANGELOG.rst with highlights of this release - Fixed URL paths with the new voxpupuli organization in README.rst - Changing the author from Daniele Sluijters to Corey Hammerton in setup.py * CHANGELOG.rst: Adding entry for change commited for voxpupuli/pypuppetdb#75 * CHANGELOG.rst: Adding entry for voxpupuli/pypuppetdb#80 * Version bump to 0.2.3 * CHANGELOG.rst: Adding changelog entry for the new fix.
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.
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.
Fixed in v3.3.0 released today. :) |
Facter 2.0 introduced structured facts (compared to only key-value pairs in 1.x). In the 2.0.x series of Facter, no structured facts were provided by default. However, as stated in the Facter 2.1.0 announcement, now
partitions
is the first standard structured fact (hash).Please add support for this in Puppetboard. By support I mean one should think of a way it can be displayed 'nicely', rather than for example:
The text was updated successfully, but these errors were encountered: