| Puppet Version: 7.18.0, 6.28.0 OS Name/Version: CentOS 7 The Problem When deploying changes to a custom type that includes relative code from the PuppetX namespace, and only the PuppetX ruby files have changed, the 'generate types' command skips the type because it thinks it's up-to-date. This means any new/removed type properties possibly won't be available due the environment isolation problem that puppet generate types was meant to solve. Actual Behavior The 'puppet generate types' command uses the following implementation to determine if a custom type's attributes should be built into '<environment>/.resource_types/*.pp':
Puppet::FileSystem::exist?(f) && (Puppet::FileSystem::stat(@path) <=> Puppet::FileSystem::stat(f)) <= 0
|
That's from https://github.com/puppetlabs/puppet/blob/7.18.0/lib/puppet/generate/type.rb#L49 This compares the modified timestamp of the type file with that of the generated .resource_types/*.pp file. But if the file in lib/puppet/type/*.rb didn't change, it's timestamp will not get updated and Puppet will think the generated types are up to date. Desired Behavior 'puppet generate types' should account for PuppetX namespaced code (e.g. "<module>/lib/puppet_x/<namespace>/.rb" ) that is included by a type that lives at <module>/lib/puppet/type/.rb. |