Jira (FACT-3065) submit facts for new facter releases to facterdb

1 view
Skip to first unread message

Tim Meusel (Jira)

unread,
Aug 19, 2021, 7:16:03 AM8/19/21
to puppe...@googlegroups.com
Tim Meusel created an issue
 
Facter / Task FACT-3065
submit facts for new facter releases to facterdb
Issue Type: Task Task
Assignee: Unassigned
Created: 2021/08/19 4:15 AM
Priority: Normal Normal
Reporter: Tim Meusel

Hi,
https://github.com/voxpupuli/facterdb is used for unit tests in basically every module. It currently relies on community contributions for new mocked facts on each facter release. Could you consider providing them on a new facter release? That would resolve a lot of issues. facterdb does a fallback to older factsets if the correct version isn't available, so sometimes tests are executed with older fact sets which lead to false/positive errors.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Aug 24, 2021, 7:37:03 AM8/24/21
to puppe...@googlegroups.com
Ciprian Badescu commented on Task FACT-3065
 
Re: submit facts for new facter releases to facterdb

Tim Meusel, is there already/could we have some automation that could be used for it? What is the process of adding new facts after a facter release?

Ciprian Badescu (Jira)

unread,
Aug 30, 2021, 10:36:03 AM8/30/21
to puppe...@googlegroups.com

Ben Ford (Jira)

unread,
Sep 14, 2021, 11:28:03 AM9/14/21
to puppe...@googlegroups.com
Ben Ford commented on Task FACT-3065

Basically, what we'd probably want to do is hook into the build/packaging CI pipeline. We would need automation to run puppet facts on each supported operating system and save the output to a file, like

$ puppet facts > facts/4.2/centos-7-x86_64.facts

then create a PR with all the files. Here's an example PR where a community member submitted facts. https://github.com/voxpupuli/facterdb/pull/181

Ciprian Badescu (Jira)

unread,
Sep 15, 2021, 10:38:03 AM9/15/21
to puppe...@googlegroups.com

I see. Then we need to find the place where we could hook this. I'm not sure if we have the obvious place to hook this of we need to change our release pipeline for it.

Ciprian Badescu (Jira)

unread,
Sep 20, 2021, 10:35:02 AM9/20/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 20, 2021, 10:37:02 AM9/20/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Oct 20, 2021, 3:50:02 AM10/20/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW - 2021-11- 03 17

Ciprian Badescu (Jira)

unread,
Nov 3, 2021, 5:51:03 AM11/3/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW - 2021- 11 12 - 17 01(02)

Ciprian Badescu (Jira)

unread,
Nov 17, 2021, 3:43:03 AM11/17/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW - 2021-12- 06 17

Ciprian Badescu (Jira)

unread,
Dec 6, 2021, 3:56:02 AM12/6/21
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Dec 14, 2021, 10:44:02 AM12/14/21
to puppe...@googlegroups.com
Gabriel Nagy commented on Task FACT-3065
 
Re: submit facts for new facter releases to facterdb

ekohl bastelfreak I updated our fact generation script to more closely resemble the layout in facterdb: https://github.com/puppetlabs/puppet-agent/pull/2176

One question I have is if you think there would be value in also including the Facter patch version in the output directory name (i.e. 4.2.6 instead of 4.2 - for us this would be trivial).

This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Gabriel Nagy (Jira)

unread,
Dec 14, 2021, 11:08:01 AM12/14/21
to puppe...@googlegroups.com

Ewoud Kohl van Wijngaarden (Jira)

unread,
Dec 14, 2021, 11:47:02 AM12/14/21
to puppe...@googlegroups.com
Ewoud Kohl van Wijngaarden commented on Task FACT-3065
 
Re: submit facts for new facter releases to facterdb

If we're going to upload facts per patch set (and I think there's value in that) it certainly makes sense. The code should already work with that since it's just a Dir.glob(File.join(facts_dir, "*", '.facts')) so you could even make it facts/4.2/4.2.6/myos.facts. I'm not saying we have to, but the code supports it.

If we consistently have that, we can even optimize some things. We now query all facts even if we know a specific facter version is requested. We could do fact filtering prior to loading files.

+1 from me on including the patch version, even bigger +1 if we modify the existing facterdb to include the patch level in the directory name.

Tim Meusel (Jira)

unread,
Dec 14, 2021, 2:49:01 PM12/14/21
to puppe...@googlegroups.com
Tim Meusel commented on Task FACT-3065

hey, thanks for all the work!
I'm not sure if rspec-puppet-facts would work out of the box with the patch releases in the directory names / if more factsets would provide some benefit. In the past we sometimes also updated existing factsets, that were created with one facter release, with a newer patch release. ekohl alexjfisher do you have any preference here?

Gabriel Nagy (Jira)

unread,
Dec 15, 2021, 8:27:02 AM12/15/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
 
Change By: Gabriel Nagy
Attachment: facts.tar.gz

Gabriel Nagy (Jira)

unread,
Dec 15, 2021, 8:28:02 AM12/15/21
to puppe...@googlegroups.com
Gabriel Nagy commented on Task FACT-3065
 
Re: submit facts for new facter releases to facterdb

I attached a factset for the current list of supported platforms, please let me know if there's anything else to be changed.

The AIX filenames look weird because of the fact values that are used in building the filename (hardwaremodel, operatingsystemmajrelease) - should we change them to something like aix-7.1-powerpc ?

I will change the directory structure to also include the Facter patch version, but the public mirroring of the factsets won't happen until after the holidays.

facts.tar.gzlink_attachment_7.gif

Ciprian Badescu (Jira)

unread,
Dec 17, 2021, 3:54:02 AM12/17/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
 
Change By: Ciprian Badescu
Sprint: NW - 2021-12-17 , NW - 2022-01-04

Ciprian Badescu (Jira)

unread,
Dec 21, 2021, 7:51:03 AM12/21/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW - 2021-12-17, NW - 2022-01- 04 12

Ciprian Badescu (Jira)

unread,
Jan 4, 2022, 3:51:02 AM1/4/22
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Sprint: NW - 2021-12-17 , NW - 2022-01-12

Nirupama Mantha (Jira)

unread,
Feb 22, 2022, 4:40:02 PM2/22/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Team: Night's Watch Phoenix
Reply all
Reply to author
Forward
0 new messages