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

Update dependency puppetlabs/concat to v7.4.0 #1972

Closed renovate[bot] closed 8 months ago

renovate[bot] commented 8 months ago

Mend Renovate

This PR contains the following updates:

Package Update Change
puppetlabs/concat minor 7.3.3 -> 7.4.0

Release Notes

puppetlabs/puppetlabs-concat (puppetlabs/concat) ### [`v7.4.0`](https://togithub.com/puppetlabs/puppetlabs-concat/blob/HEAD/CHANGELOG.md#v740---2023-04-12) [Compare Source](https://togithub.com/puppetlabs/puppetlabs-concat/compare/v7.3.3...v7.4.0) [Full Changelog](https://togithub.com/puppetlabs/puppetlabs-concat/compare/v7.3.3...v7.4.0) ##### Added - Add parameter to not create empty files when no fragments are defined [#​766](https://togithub.com/puppetlabs/puppetlabs-concat/pull/766) ([JonasVerhofste](https://togithub.com/JonasVerhofste)) ##### Fixed - puppet5: drop remnants of puppet5 code [#​761](https://togithub.com/puppetlabs/puppetlabs-concat/pull/761) ([b4ldr](https://togithub.com/b4ldr)) - Allow content parameter of concat_fragment to be Sensitive [#​757](https://togithub.com/puppetlabs/puppetlabs-concat/pull/757) ([baurmatt](https://togithub.com/baurmatt))

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

evgeni commented 8 months ago

After merging this, our nodes fail with:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'create_empty_file' (file: /etc/puppetlabs/code/environments/production/external_modules/concat/manifests/init.pp, line: 126) on Concat_file[/etc/puppetlabs/puppet/puppet.conf] (file: /etc/puppetlabs/code/environments/production/external_modules/concat/manifests/init.pp, line: 126) on node puppet01.conova.theforeman.org

create_empty_file is a new thing in 7.4.0 and I don't get why it doesn't find it.

evgeni commented 8 months ago

Mh, /etc/puppetlabs/code/environments/production/.resource_types/concat_file.pp was out of date, even tho we update types on deployment. Weird.

evgeni commented 8 months ago

ahahahahahahahahaha

irb(main):001:0> File.stat('/etc/puppetlabs/code/environments/production/external_modules/concat/lib/puppet/type/concat_file.rb')
=> #<File::Stat dev=0xfd00, ino=51029983, mode=0100644, nlink=1, uid=1001, gid=1001, rdev=0x0, size=11768, blksize=4096, blocks=24, atime=2023-11-13 07:55:12.91085985 +0000, mtime=2023-04-12 13:22:52 +0000, ctime=2023-11-13 07:55:06.340904433 +0000>
irb(main):002:0> File.stat('/etc/puppetlabs/code/environments/production/.resource_types.orig/concat_file.pp')
=> #<File::Stat dev=0xfd00, ino=18091672, mode=0100664, nlink=1, uid=1001, gid=1001, rdev=0x0, size=5542, blksize=4096, blocks=16, atime=2023-11-13 07:55:15.70784087 +0000, mtime=2023-04-13 15:12:57.538955937 +0000, ctime=2023-11-13 07:55:06.350904365 +0000>

the file in the module was modified on 2023-04-12, but the file in our cache was updated on 2023-04-13 (even if from a totally different version of the source), so puppet generate types didn't consider that file as changed (see https://github.com/puppetlabs/puppet/blob/1145d44a76f77ec9671a3ffa46f68f589fd0418a/lib/puppet/generate/type.rb#L47-L50) and thus didn't do shit until I forced it to.