Jira (FACT-3022) `--json` flag inconsistencies between Facter 3 and Facter 4 when resolving external executable files

1 view
Skip to first unread message

Mihai Buzgau (Jira)

unread,
Apr 19, 2021, 5:29:02 AM4/19/21
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
 
Facter / Bug FACT-3022
`--json` flag inconsistencies between Facter 3 and Facter 4 when resolving external executable files
Change By: Mihai Buzgau
Summary: `--json` flag inconsistencies between Facter 3 and Facter 4 when resolving external executable files
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Gheorghe Popescu (Jira)

unread,
Apr 19, 2021, 5:29:03 AM4/19/21
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Acceptance Criteria: --json produces the same output on Facter 3 and Facter 4

Gheorghe Popescu (Jira)

unread,
Apr 19, 2021, 5:35:01 AM4/19/21
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Running facter cli with `--json` produces different outputs, on Facter 3 and Facter 4, for facts that cannot be resolved
when querying for fact names


{code}
# facter 4
❯ bx facter non_existent --json
{
  "non_existent": null
}

# facter 3
❯ cfacter non_existent --json
{
  "non_existent": ""
}
{code}

This can also be seen with external executable facts that do not produce any output, or have errors, creating entries in `puppet facts diff`

{code}
cat /etc/facter/facts.d/bad.sh
#!/bin/sh
echo bad=`abc`

puppet facts diff
Warning: Facter: external fact file "/etc/facter/facts.d/bad.sh" had output on stderr: /etc/facter/facts.d/bad.sh: line 2: abc: command not found
Warning: Facter: external fact file "/etc/facter/facts.d/bad.sh" had output on stderr: /etc/facter/facts.d/bad.sh: line 2: abc: command not found
{
  "bad": {
    "new_value": null,
    "old_value": ""
  }
}
{code}

Mihai Buzgau (Jira)

unread,
Apr 20, 2021, 11:03:01 AM4/20/21
to puppe...@googlegroups.com

Beth Glenfield (Jira)

unread,
Jun 15, 2021, 5:10:01 AM6/15/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 7, 2021, 4:01:02 AM9/7/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 7, 2021, 4:01:03 AM9/7/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 7, 2021, 4:01:03 AM9/7/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 8, 2021, 5:13:02 AM9/8/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Sep 14, 2021, 10:51:03 AM9/14/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Sep 17, 2021, 9:59:04 AM9/17/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages