Jira (PUP-11089) Puppet 7.6 breaks dot notation for custom facts (regression)

0 views
Skip to first unread message

Sebastian Krysmanski (Jira)

unread,
Jun 7, 2021, 7:31:04 AM6/7/21
to puppe...@googlegroups.com
Sebastian Krysmanski created an issue
 
Puppet / Bug PUP-11089
Puppet 7.6 breaks dot notation for custom facts (regression)
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/06/07 4:30 AM
Priority: Normal Normal
Reporter: Sebastian Krysmanski

Puppet Version: 7.6.1, 7.7.0
Puppet Server Version: -
OS Name/Version: Windows 10

Puppet 7.6.1 (and also 7.7.0) breaks the dot notation for custom facts.

To reproduce the problem, create an empty directory (A) and inside this directory, create the following subdirectories:

site\modules\profiles\facts.d

Inside the facts.d directory, create a file called fact_test.ps1 and fill it with this content

Write-Host 'mycustom_fact.mysubfact=abc' 

Then from the top directory (A), call this:

puppet facts --environmentpath=. --environment=site

Desired Behavior:

The output should contain something like this:

"mycustom_fact": {
    "mysubfact": "abc"
}

Actual Behavior:

This works up to Puppet 7.5.0. Starting with Puppet 7.6.1, the output is like this:

"mycustom_fact.mysubfact": "abc"

The release notes don't mention anything about this change. In any case, for us this is a breaking change because we have Puppet scripts that rely on the version 7.5 behavior.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Sebastian Krysmanski (Jira)

unread,
Jun 7, 2021, 7:32:01 AM6/7/21
to puppe...@googlegroups.com
Sebastian Krysmanski updated an issue
Change By: Sebastian Krysmanski
Affects Version/s: PUP 7.7.0
Affects Version/s: PUP 7.6.0

Gabriel Nagy (Jira)

unread,
Jun 8, 2021, 9:29:03 AM6/8/21
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug PUP-11089
 
Re: Puppet 7.6 breaks dot notation for custom facts (regression)

Hi Sebastian Krysmanski,

Due to a large number of users depending on dotted facts with the expectation of being unstructured, we had to revert this behavior to match Facter 3 (FACT-3004). We're sorry about the inconvenience.

The functionality is still available but has to be opted in by setting force-dot-resolution to true in facter.conf:

global : {
    force-dot-resolution : true
}

The change went into Facter 4.1.0 which has the following release notes: https://puppet.com/docs/puppet/7/release_notes_facter.html#release_notes_facter_4-1-0-resolved-issues-4-1-0

Sebastian Krysmanski (Jira)

unread,
Jun 8, 2021, 10:53:04 AM6/8/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages