Jira (PUP-10973) `puppet facts diff` output should be pretty

25 views
Skip to first unread message

Nick Walker (Jira)

unread,
Mar 25, 2021, 12:53:04 PM3/25/21
to puppe...@googlegroups.com
Nick Walker created an issue
 
Puppet / Task PUP-10973
`puppet facts diff` output should be pretty
Issue Type: Task Task
Assignee: Unassigned
Created: 2021/03/25 9:52 AM
Priority: Normal Normal
Reporter: Nick Walker

The Problem

The output of `puppet facts diff` is all smashed on one line instead of being human readable.

[root@master20198-latest-centos ~]# puppet facts diff
{"foo.bar":{"new_value":null,"old_value":"true"},"pe_postgresql_info.data_partition_available_bytes":{"new_value":59176595456,"old_value":59176505344},"platform_tag":{"new_value":"centos-7-x86_64","old_value":"el-7-x86_64"},"puppet_inventory_metadata.packages.last_collection_time":{"new_value":"0.4702s","old_value":"0.588s"}}

I have to run it through another tool like python or jq to effectively read the output

[root@master20198-latest-centos ~]# puppet facts diff | python -m json.tool
{
    "foo.bar": {
        "new_value": null,
        "old_value": "true"
    },
    "pe_postgresql_info.data_partition_available_bytes": {
        "new_value": 59173752832,
        "old_value": 59173863424
    },
    "platform_tag": {
        "new_value": "centos-7-x86_64",
        "old_value": "el-7-x86_64"
    },
    "puppet_inventory_metadata.packages.last_collection_time": {
        "new_value": "0.463s",
        "old_value": "0.5941s"
    }
}

Suggested solution

We should print the output in a human readable format.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Nick Walker (Jira)

unread,
Mar 25, 2021, 12:54:03 PM3/25/21
to puppe...@googlegroups.com
Nick Walker updated an issue
 
Puppet / Improvement PUP-10973
Change By: Nick Walker
Issue Type: Task Improvement

Mihai Buzgau (Jira)

unread,
Mar 25, 2021, 12:56:03 PM3/25/21
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Team: Night's Watch

Mihai Buzgau (Jira)

unread,
Mar 30, 2021, 9:47:03 AM3/30/21
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: NW - 2021-04-14

Mihai Buzgau (Jira)

unread,
Mar 31, 2021, 4:24:04 AM3/31/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Mar 31, 2021, 10:22:04 AM3/31/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 5, 2021, 2:43:04 PM4/5/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.22.0
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 6, 2021, 1:13:04 PM4/6/21
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-10973
 
Re: `puppet facts diff` output should be pretty

Passed CI in puppet#42cb3a33b8

Josh Cooper (Jira)

unread,
Apr 6, 2021, 1:16:04 PM4/6/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Enhancement
Release Notes Summary: The "puppet facts diff" command now pretty prints its JSON output. The older form can be specified using "--render_as json".

Claire Cadman (Jira)

unread,
Apr 13, 2021, 9:46:01 AM4/13/21
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed

Molly Waggett (Jira)

unread,
Apr 14, 2021, 2:54:04 PM4/14/21
to puppe...@googlegroups.com
Molly Waggett commented on Improvement PUP-10973
 
Re: `puppet facts diff` output should be pretty

Luchian Nemes should this also have PUP 7.6.0 as a fix version?

Reply all
Reply to author
Forward
0 new messages