Fixes #38930 - Make fact parsers use proper os
Make sure the fact parser searches by all unique constraint combinations before creating a new object.
Fixed the original errors that @ekohl was referring to. The new errors seem trickier, since they do not appear in my local environment.
[test]
Found out that the errors came from newer gem version in the CI. Updated the gem versions locally and the errors appeared for me too. The errors were related to problems parsing fact files in the facterdb gem. Some of those files contain invalid json.
I have fixed the issue by forcing facterdb to load only the files that are relevant to the checks we perform. Luckily those files were OK, and the tests could run successfully.
Did you file an issue for the broken files?
Did you file an issue for the broken files?
We're using an antique version of facterdb gem. In the newer versions of the gem we don't have older facter versions of the data, so I didn't test our code against the newer facterdb. If we want to file a ticket, it would not make sense to file it against v1.27 when v4.0 is already out.
Added ansible fact management and added the reproducer steps to the description.
Basically you want to create an operating system with the same description as the one that will be generated by the fact parser, and then run the parser.
For puppet parser it's crucial, since it is used during the upgrade procedure.
We're using an antique version of facterdb gem. In the newer versions of the gem we don't have older facter versions of the data, so I didn't test our code against the newer facterdb. If we want to file a ticket, it would not make sense to file it against v1.27 when v4.0 is already out.
That's fair. We should look at updating, but that's for another PR.