foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Fixes #38930 - Make fact parsers use proper os

Open ShimShtein opened this issue 1 month ago • 5 comments

Make sure the fact parser searches by all unique constraint combinations before creating a new object.

ShimShtein avatar Dec 03 '25 14:12 ShimShtein

Fixed the original errors that @ekohl was referring to. The new errors seem trickier, since they do not appear in my local environment.

ShimShtein avatar Dec 03 '25 20:12 ShimShtein

[test]

ShimShtein avatar Dec 03 '25 20:12 ShimShtein

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.

ShimShtein avatar Dec 07 '25 15:12 ShimShtein

Did you file an issue for the broken files?

ekohl avatar Dec 07 '25 19:12 ekohl

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.

ShimShtein avatar Dec 08 '25 09:12 ShimShtein

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.

ShimShtein avatar Dec 10 '25 16:12 ShimShtein

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.

ekohl avatar Dec 11 '25 12:12 ekohl