Facterdb default filter no longer works
This is related to the fact that factedb has dropped support for legacy facts in facterdb v3
There is a previous similar issues but i suspect its unrelated https://github.com/nwops/puppet-debugger/issues/46
Im also seeing issues the facterdb 2.1.0 I recive the following error
Using filter: operatingsystem=Fedora and operatingsystemrelease=23 and architecture=x86_64 and facterversion=/^3\.1/
Bad FacterDB filter, please change the filter so it returns a result set.
See https://github.com/camptocamp/facterdb/#with-a-string-filter
however running the following works
$ facterdb operatingsystem=Fedora and operatingsystemrelease=23 and architecture=x86_64 and facterversion=/^3\.1/
For now i have got things working using the debian bookworm version 1.12.1-1
@b4ldr you are saying that this one works for you with Facterdb 3.4
$ facterdb operatingsystem=Fedora and operatingsystemrelease=23 and architecture=x86_64 and facterversion=/^3\.1/
but I am getting an empty array
So, operatingsystem no longer exists.
a quick & dirty workaround consists of editing this file (I have .rbenv):
.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/puppet-debugger-1.4.0/lib/puppet-debugger/support/facts.rb
You can add a proper filter, or just replace the filter with an empty string: ""
and replace this block at line 14 as follows:
def default_facterdb_filter
"operatingsystem=#{facter_os_name} and operatingsystemrelease=#{facter_os_version} and architecture=x86_64 and facterversion=#{facter_version}"
end
def default_facterdb_filter
""
end
@b4ldr you are saying that this one works for you with Facterdb 3.4
$ facterdb operatingsystem=Fedora and operatingsystemrelease=23 and architecture=x86_64 and facterversion=/^3\.1/
No i was saying that facterdb dropped legacy facts in 3.0.0 as such the current default_facterdb_filter does not work. As a workaround i switched to using facterdb v1.27.0
This works for me:
DEBUGGER_FACTERDB_FILTER="facterversion=/^4/" puppet-debugger
FYi there is a PR to fix this: #77
Please note this repo is hosted on gitlab. https://gitlab.com/puppet-debugger/puppet-debugger
The issue is track at https://gitlab.com/puppet-debugger/puppet-debugger/-/issues/22
I am currently updating the code and hope to get a minor release out soon.
fixed in release 1.5.0