Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Parker Leach updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Parker Leach Labels: docs_reviewed Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.6795.1675269540192%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper Fix Version/s: PUP 7.23.0 Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.3756.1674610200103%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper Release Notes: Bug Fix Release Notes Summary: Catalog compilation no longer fails when using the "dig" function and excluding legacy facts. Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.3755.1674610200056%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper If legacy facts are disabled (PUP-11662) , then the {{$facts}} variable will refer to an instance of {{ {} Facter::FactCollection { }} } , which subclasses {{ {} Hash { }} } , rather than a {{Hash}} instance. See FACT-3179.When attempting to dig into facts, e.g. {{ {} $facts.dig('..') { }} } , then the dig function will fail, because the [function expects a {{Collection}}|https://github.com/puppetlabs/puppet/blob/7f96b47f8419ad95509552f75690fad957fb97a9/lib/puppet/functions/dig.rb#L32] not a {{ {} Runtime { }} } : {noformat} $ puppet apply -e '$facts.dig("ruby")' --no-include_legacy_factsError: Evaluation Error: Error while evaluating a Method call, 'dig' parameter 'data' expects a value of type Undef or Collection, got Runtime (line: 1, column: 11) on node localhost{noformat} Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper commented on PUP-11717 Re: Can't "dig" into facts when legacy facts are excluded Looks like it's ok: ❯ bx puppet --version 7.21.0 ❯ bx puppet apply -e 'notice(fact("ruby.version"))' --no-include_legacy_facts Notice: Scope(Class[main]): 2.7.6 Notice: Compiled catalog for localhost in environment production in 0.01 seconds Notice: Applied catalog in 0.04 seconds The dig function is a little unique in that it requires a Collection parameter, so it triggers the issue. I'm not sure how many user function do that level of type checking, but I'm sure someone is. Add Comment
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Ben Ford commented on PUP-11717 Re: Can't "dig" into facts when legacy facts are excluded The PR looks like it also protects fact() from breaking, but maybe worth a quick check. Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.2430.1674088980029%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper assigned an issue to Josh Cooper Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper Assignee: Josh Cooper Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.2424.1674085860031%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper Epic Link: PUP-11658 Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.2318.1674069300196%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Morgan Rhodes updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Morgan Rhodes Sprint: Phoenix 2023-02-01 Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.2248.1674066360182%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper Story Points: 2 Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.1931.1674004800027%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper updated an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Change By: Josh Cooper Team: Phoenix Add Comment This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.479164.1673933795000.1287.1673933940020%40Atlassian.JIRA.
Jira (PUP-11717) Can't "dig" into facts when legacy facts are excluded
Title: Message Title Josh Cooper created an issue Puppet / PUP-11717 Can't "dig" into facts when legacy facts are excluded Issue Type: Task Assignee: Unassigned Created: 2023/01/16 9:36 PM Fix Versions: 7.22.0 Priority: Normal Reporter: Josh Cooper If legacy facts are disabled, then the $facts variable will refer to an instance of Facter::FactCollection, which subclasses Hash, rather than a Hash instance. See FACT-3179. When attempting to dig into facts, e.g. $facts.dig('..'), then the dig function will fail, because the function expects a Collection not a Runtime: $ puppet apply -e '$facts.dig("ruby")' --no-include_legacy_facts Error: Evaluation Error: Error while evaluating a Method call, 'dig' parameter 'data' expects a value of type Undef or Collection, got Runtime (line: 1, column: 11) on node localhost