Jira (PUP-8140) NoMethodErrors involving Puppet::Face instances do not have a useful text representation

2017-11-09 Thread Charlie Sharpsteen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Charlie Sharpsteen updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-8140 
 
 
 
  NoMethodErrors involving Puppet::Face instances do not have a useful text representation  
 
 
 
 
 
 
 
 
 

Change By:
 
 Charlie Sharpsteen 
 
 
 

Release Notes Summary:
 
 Error messages from Puppet::Face objects now include the name and version number of the face. 
 
 
 

Method Found:
 
 Needs Assessment Customer Feedback 
 
 
 

Release Notes:
 
 Bug Fix 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-8140) NoMethodErrors involving Puppet::Face instances do not have a useful text representation

2017-11-09 Thread Charlie Sharpsteen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Charlie Sharpsteen updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-8140 
 
 
 
  NoMethodErrors involving Puppet::Face instances do not have a useful text representation  
 
 
 
 
 
 
 
 
 

Change By:
 
 Charlie Sharpsteen 
 
 
 

Acceptance Criteria:
 
 The Puppet::Face class does not define a useful text representation for use in some error messages --- I.E. {{NoMethodError}}. This makes errors involving missing methods on Puppet Faces especially difficult to track down. Puppet Faces allow multiple versions, so these errors are easy to create by third-party modules defining a new Face version that other Puppet components don't expect.h2. Reproduction Case.  - Install the latest puppet-agent 4.10.x on CentOS 7:{code:bash}rpm -Uvh http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpmyum install -y puppet-agent{code}  - Create a module containing a Puppet Face that can fail due to multiple versions:{code:bash}mkdir -p /etc/puppetlabs/code/environments/production/modules/test_face/lib/puppet/applicationcat < /etc/puppetlabs/code/environments/production/modules/test_face/lib/puppet/application/foo.rbrequire 'puppet/application/face_base'class Puppet::Application::Foo < Puppet::Application::FaceBaseendEOFmkdir -p /etc/puppetlabs/code/environments/production/modules/test_face/lib/puppet/facecat  <  /etc/puppetlabs/code/environments/production/modules/test_face/lib/puppet/face/foo.rbPuppet::Face.define(:foo, '0.0.1') do  action :bar dowhen_invoked do |*args|  puts "Bar action called!"end  end  action :baz dowhen_invoked do |*args|  puts "Baz action called!"  Puppet::Face[:foo, :current].barend  endendPuppet::Face.define(:foo, '0.0.2') do  action :bim dowhen_invoked do |*args|  puts "Bim action called!"end  endendEOF{code}  - Run the face to generate a failure: {{/opt/puppetlabs/puppet/bin/puppet foo baz}}h3. OutcomeThe error message indicates no {{baz}} method is avaiailble, but provides no clue that Face versions are coming into play:{noformat}# /opt/puppetlabs/puppet/bin/puppet foo bazBaz action called!Error: undefined method `bar' for #Error: Try 'puppet help foo baz' for usage{noformat}h3. Expected OutcomeThe error message should include the face name and version number, as provided by the {{to_s}} method of the Puppet::Interface class:{noformat}# /opt/puppetlabs/puppet/bin/puppet foo bazBaz action called!Error: undefined method `bar' for Puppet::Face[:foo, v0.0.2]:Puppet::InterfaceError: Try 'puppet help foo baz' for usage{noformat} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 

Jira (PUP-8140) NoMethodErrors involving Puppet::Face instances do not have a useful text representation

2017-11-09 Thread Charlie Sharpsteen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Charlie Sharpsteen created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-8140 
 
 
 
  NoMethodErrors involving Puppet::Face instances do not have a useful text representation  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 5.3.3, PUP 4.10.9 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2017/11/09 10:18 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Charlie Sharpsteen 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)