Jira (BOLT-1433) get_resources does not work with resource objects.

10 views
Skip to first unread message

Alex Dreyer (JIRA)

unread,
Jun 27, 2019, 11:36:04 AM6/27/19
to puppe...@googlegroups.com
Alex Dreyer created an issue
 
Puppet Task Runner / New Feature BOLT-1433
get_resources does not work with resource objects.
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2019/06/27 8:35 AM
Priority: Normal Normal
Reporter: Alex Dreyer

We document get_resources(localhost, Package) as an example of how to use get_resources and the function itself is defined to accept Resource objects in addition to strings. However Resource Types are not loaded during a plan so unless you quote the resource name and pass it as a string the plan will error.

"Evaluation Error: Resource type not found: Package[...]

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Alex Dreyer (JIRA)

unread,
Jun 27, 2019, 1:18:02 PM6/27/19
to puppe...@googlegroups.com
Alex Dreyer updated an issue
Change By: Alex Dreyer
We document {{get_resources(localhost, Package)}} as an example of how to use get_resources and the function itself is defined to accept Resource objects in addition to strings. However Resource Types are not loaded during a plan so unless you quote the resource name and pass it as a string the plan will error.

{{"Evaluation Error: Resource type not found: Package[...]}}

Users should be able to use core types like {{Package}} and {{File}} or any custom types available on the module path with {{get_resources}} which may change how these objects behave more generally in the plan language.

Alex Dreyer (JIRA)

unread,
Jun 27, 2019, 1:18:03 PM6/27/19
to puppe...@googlegroups.com
Alex Dreyer updated an issue
Change By: Alex Dreyer
Sprint: Bolt Ready for Grooming Kanban

Lucy Wyman (JIRA)

unread,
Jul 2, 2019, 12:20:03 PM7/2/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
 
Puppet Task Runner / Bug BOLT-1433
Change By: Lucy Wyman
Issue Type: New Feature Bug

Cas Donoghue (JIRA)

unread,
Jul 25, 2019, 12:57:03 PM7/25/19
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Jul 25, 2019, 3:45:02 PM7/25/19
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug BOLT-1433
 
Re: get_resources does not work with resource objects.

If the concept of "resources" should exist while compiling in "script"/bolt mode then resource types should really also work, or it starts to be confusing. I can imagine that it starts to get tricky though since some operations on resources require that there is a Catalog - and there isn't one in "script mode".

Alex Dreyer (JIRA)

unread,
Jul 26, 2019, 11:31:04 AM7/26/19
to puppe...@googlegroups.com
Alex Dreyer commented on Bug BOLT-1433

Henrik Lindberg I agree we'll need to load the resource types. I'm not exactly sure what you mean by the "work" though. One of our longer term goals is to make bolt more resource aware. During a plan you should be able to discover resources and track changes made to those resources. The get_resources function is the first step towards this.

Reply all
Reply to author
Forward
0 new messages