Jira (PUP-11078) puppet generate types should return non-zero when types cannot be generated

40 views
Skip to first unread message

Ben Ford (Jira)

unread,
Jun 2, 2021, 7:45:02 PM6/2/21
to puppe...@googlegroups.com
Ben Ford created an issue
 
Puppet / Bug PUP-11078
puppet generate types should return non-zero when types cannot be generated
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/06/02 4:44 PM
Priority: Normal Normal
Reporter: Ben Ford

When puppet generate types cannot generate types, it will error, but it explicitly just logs it and keeps going.

https://github.com/puppetlabs/puppet/blob/1a13e0cf96c70b303492e684f9ccf4c38207b3dd/lib/puppet/generate/type.rb#L204-L211

[~/.puppetlabs/etc/code/environments/production]$ puppet generate types
Notice: Generating Puppet resource types.
Error: /Users/ben/.puppetlabs/etc/code/environments/production/modules/drupal/lib/puppet/type/drupal_module.rb: title patterns that use procs are not supported.
Error: /Users/ben/.puppetlabs/etc/code/environments/production/modules/drupal/lib/puppet/type/drupal_theme.rb: title patterns that use procs are not supported.
Error: /Users/ben/.puppetlabs/etc/code/environments/production/modules/drupal/lib/puppet/type/drupal_variable.rb: title patterns that use procs are not supported.
[~/.puppetlabs/etc/code/environments/production]$ echo $?
0

This might be so that code manager doesn't fail when code is deployed, but this is certainly not expected. Should there be an option for explicit error codes?

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

Ciprian Badescu (Jira)

unread,
Jun 8, 2021, 10:55:03 AM6/8/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Jun 8, 2021, 10:56:02 AM6/8/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Aug 18, 2021, 3:04:03 PM8/18/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: Triaged tickets ready for triage 2

Ciprian Badescu (Jira)

unread,
Oct 20, 2021, 4:57:03 AM10/20/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Oct 25, 2021, 10:43:03 AM10/25/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Nov 3, 2021, 5:09:03 AM11/3/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Nov 10, 2021, 3:49:02 AM11/10/21
to puppe...@googlegroups.com

Victor Bobosila (Jira)

unread,
Nov 24, 2021, 3:34:01 AM11/24/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Dec 6, 2021, 4:27:01 AM12/6/21
to puppe...@googlegroups.com

Victor Bobosila (Jira)

unread,
Dec 17, 2021, 3:50:01 AM12/17/21
to puppe...@googlegroups.com
Victor Bobosila updated an issue
Change By: Victor Bobosila
Release Notes: Bug Fix
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Victor Bobosila (Jira)

unread,
Dec 17, 2021, 3:51:03 AM12/17/21
to puppe...@googlegroups.com
Victor Bobosila updated an issue
Change By: Victor Bobosila
Release Notes Summary: Fix an issue where puppet generate would return an exit code with the value of 0 even when failing to generate a new custom type by creating a new Puppet::Generator method that checks whether a type has raised an error or not

Ciprian Badescu (Jira)

unread,
Dec 17, 2021, 3:54:01 AM12/17/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW - 2021-12-06, NW - 2021-12-17 , NW - 2022-01-04

Josh Cooper (Jira)

unread,
Jan 12, 2022, 3:21:02 PM1/12/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 14, 2022, 2:53:01 PM1/14/22
to puppe...@googlegroups.com

Heston Hoffman (Jira)

unread,
Jan 20, 2022, 4:52:03 PM1/20/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 23, 2022, 12:01:02 AM2/23/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages