Jira (PUP-4930) Provide helpful error message when provider does not have instances defined

10 views
Skip to first unread message

Daniele Sluijters (JIRA)

unread,
Jul 27, 2015, 1:09:15 PM7/27/15
to puppe...@googlegroups.com
Daniele Sluijters created an issue
 
Puppet / Bug PUP-4930
Provide helpful error message when provider does not have instances defined
Issue Type: Bug Bug
Assignee: Kylo Ginsberg
Components: Types and Providers
Created: 2015/07/27 10:09 AM
Environment:

Any Puppet version ever on any platform

Priority: Normal Normal
Reporter: Daniele Sluijters

When using the RAL to get a list of resources, if the provider does not have the instances method defined you get:

Error: Could not run: Provider getsetsebool has not defined the 'instances' class method

Regurgitating and implementation detail is incredibly unhelpful except for those few that actually know how types and providers work.

I'd like to suggest we add a default instances method on providers that gives us a more helpful error message which every provider must then override (which they'll do anyway if they want to provide this feature, if not they get a user friendly error message for free).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Daniele Sluijters (JIRA)

unread,
Jul 27, 2015, 1:33:06 PM7/27/15
to puppe...@googlegroups.com
Daniele Sluijters updated an issue
Change By: Daniele Sluijters
When using the RAL to get a list of resources, if the provider does not have the {{instances}} method defined you get:

{code}

Error: Could not run: Provider getsetsebool has not defined the 'instances' class method
{code}

Regurgitating
 and  an  implementation detail is incredibly unhelpful except for those few that actually know how types and providers work.


I'd like to suggest we add a default {{instances}} method on providers that gives us a more helpful error message which every provider must then override (which they'll do anyway if they want to provide this feature, if not they get a user friendly error message for free).

John Duarte (JIRA)

unread,
May 17, 2017, 2:40:03 PM5/17/17
to puppe...@googlegroups.com
John Duarte updated an issue
Change By: John Duarte
Labels: triaged
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Josh Cooper (JIRA)

unread,
May 17, 2017, 2:42:03 PM5/17/17
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Unassigned
Change By: Josh Cooper
Assignee: Kylo Ginsberg

Josh Cooper (JIRA)

unread,
Jun 7, 2018, 4:27:03 PM6/7/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Coremunity
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jun 7, 2018, 4:28:04 PM6/7/18
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-4930
 
Re: Provide helpful error message when provider does not have instances defined

FYI David Schmitt I think you filed a ticket around this with the Resource API to work around the fact that puppet doesn't provide this by default?

Rob Braden (JIRA)

unread,
May 13, 2019, 2:56:04 PM5/13/19
to puppe...@googlegroups.com
Rob Braden commented on Bug PUP-4930

David Schmitt Josh Cooper Is this still an issue or has this been fixed in Resource API?

David Schmitt (JIRA)

unread,
May 14, 2019, 3:16:03 AM5/14/19
to puppe...@googlegroups.com
David Schmitt assigned an issue to Rob Braden
 

A really simple change.

I've put up https://github.com/puppetlabs/puppet/pull/7522 to address this.

Assigning to Rob Braden for hand-holding through the process.

Change By: David Schmitt
Assignee: Rob Braden
Release Notes Summary: Improved a developer error on `provider.instances`.
Release Notes: Bug Fix

Jorie Tappa (JIRA)

unread,
May 28, 2019, 12:58:03 PM5/28/19
to puppe...@googlegroups.com
Jorie Tappa commented on Bug PUP-4930
 
Re: Provide helpful error message when provider does not have instances defined

Merged to 5.5.x at 59922c930139c415e9e982d17ab1ca5d836fb3e9

Oana Tanasoiu (JIRA)

unread,
Jun 10, 2019, 3:06:04 AM6/10/19
to puppe...@googlegroups.com

Oana Tanasoiu (JIRA)

unread,
Jun 10, 2019, 3:06:05 AM6/10/19
to puppe...@googlegroups.com

Heston Hoffman (JIRA)

unread,
Jun 12, 2019, 4:26:04 PM6/12/19
to puppe...@googlegroups.com

Gheorghe Popescu (JIRA)

unread,
Jul 3, 2019, 4:39:03 AM7/3/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Fix Version/s: PUP 6.4.3
Fix Version/s: PUP 6.0.10
Fix Version/s: PUP 5.5.15
Reply all
Reply to author
Forward
0 new messages