puppetlabs / puppetlabs-concat

File concatenation system for Puppet
Apache License 2.0
171 stars 303 forks source link

v7.3.2 change creates error with running `puppet generate types` on Puppetserver #758

Closed canihavethisone closed 1 year ago

canihavethisone commented 1 year ago

Describe the Bug

Running puppet generate types with v7.3.2 of this module creates the error

Error: Failed to load custom type 'concat_file' from '/etc/puppetlabs/code/environments/production/modules/concat/lib/puppet/type/concat_file.rb': uninitialized constant Puppet::Type::File

Expected Behavior

Generate types to succeed as it did with previous versions

Steps to Reproduce

Steps to reproduce the behavior:

  1. install module on Puppetserver
  2. run puppet generate types

Environment

Additional Context

Issue seems to be caused by the removal of one of more of these lines from lib/puppet/type/concat_file.rb in the 7.3.2 release

require 'puppet/type/file/owner'
require 'puppet/type/file/group'
require 'puppet/type/file/mode'

Adding require 'puppet/type/file' to lib/puppet/type/concat_file.rb restores functionality

canihavethisone commented 1 year ago

@LukasAud bringing this to your attention as the last merge was yours at https://github.com/puppetlabs/puppetlabs-concat/pull/755. Thanks!

TheMeier commented 1 year ago

I am experiencing the same issue. Had to downgrade concat

LukasAud commented 1 year ago

Will revert this change and release a bugfix asap.

LukasAud commented 1 year ago

This issue should be addressed with the #759 reversal and current release (v7.3.3). We will investigate the failure further.

canihavethisone commented 1 year ago

Thanks for addressing this so quickly!