theforeman / foreman-infra

Puppet modules and scripts to manage Foreman project infrastructure
https://theforeman.github.io/foreman-infra
Apache License 2.0
23 stars 51 forks source link

Use --force with puppet generate types #2013

Closed ekohl closed 6 months ago

ekohl commented 6 months ago

When installing a new module it maintains the file timestamps from the original tarball. puppet generate types uses the timestamp of when it ran.

If you update a module to a release that was created before it ran puppet types generate, it will never update the types. This can happen with a module downgrade, or just when you regenerated types manually. By using --force the timestamps are ignored.

evgeni commented 6 months ago

I could swear I had already submitted such a PR with exactly that explanation 🙈

ekohl commented 6 months ago

https://github.com/puppetlabs/puppet/pull/9206 would be a proper fix in Puppet, but until we can rely on that I think this is better.

ekohl commented 6 months ago

I do recall you complaining about it, but I didn't see any PR.