Skip to content

Extend fact to not fail on debian packages#416

Merged
bastelfreak merged 5 commits into
puppetlabs:mainfrom
rwaffen:update_fact
Jul 5, 2024
Merged

Extend fact to not fail on debian packages#416
bastelfreak merged 5 commits into
puppetlabs:mainfrom
rwaffen:update_fact

Conversation

@rwaffen

@rwaffen rwaffen commented Jun 14, 2024

Copy link
Copy Markdown
Contributor

i tried to get around the debian package differences and report a version also if this package is used. sadly somehow i didnt get puppetdb version running on my ubuntu testbox. so i tried to get the version from the package itself if it is not the puppetlabs one.

fixes: #413

rwaffen added 2 commits June 14, 2024 15:33
Signed-off-by: Robert Waffen <rwaffen@gmail.com>
Signed-off-by: Robert Waffen <rwaffen@gmail.com>
@rwaffen rwaffen requested review from a team, bastelfreak and smortex as code owners June 14, 2024 13:38
Comment thread lib/facter/puppetdb_version.rb Outdated
Comment thread lib/facter/puppetdb_version.rb Outdated
rwaffen and others added 2 commits June 14, 2024 15:47
Co-authored-by: Tim Meusel <tim@bastelfreak.de>
- use Facter-functions

Signed-off-by: Robert Waffen <rwaffen@gmail.com>
@rwaffen rwaffen requested a review from bastelfreak June 17, 2024 07:12

@smortex smortex left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like this: it really stands as a packaging issue, and with the lifecycles of Debian releases we will have to carry this cruft for years… 😭

I added in-line notes, I think it is not as reliable as expected as it is now, but not being able to test this because of the missing Debian 12 packages from Puppetlabs do not help 😭.

Comment thread lib/facter/puppetdb_version.rb Outdated
- just report nil if command fails

Signed-off-by: Robert Waffen <rwaffen@gmail.com>
@rwaffen

rwaffen commented Jun 28, 2024

Copy link
Copy Markdown
Contributor Author

i'll drop my efforts on solving this. its hard to get a testing environment for me. and the packages are completly not like the puppetlabs ones. this is a puppetlabs repo, so we handle puppetlabs packages with puppetlabs commands. if commands fail, report nil and exit.

@rwaffen rwaffen changed the title Extend fact to handle debian packages too Extend fact to not fail on debian packages Jun 28, 2024
@rwaffen rwaffen requested a review from smortex June 28, 2024 08:42
@bastelfreak

Copy link
Copy Markdown
Collaborator

I think this is valid, if someone cares about packages for other distributions they can add support for it.

@bastelfreak bastelfreak merged commit 7fdf4a5 into puppetlabs:main Jul 5, 2024
@rwaffen rwaffen deleted the update_fact branch July 5, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error while resolving custom fact fact='puppetdb_version'

3 participants