From 6a48c5cbeebfce5ee13acefcb7240aca84d01750 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Tue, 10 Nov 2026 21:56:51 +0000 Subject: [PATCH 1/9] Install openvox-agent in the acceptance job The job installed Perforce's puppet-agent from the puppet8 stream and put the checked out facter into it. It now installs the latest openvox-agent of the openvox9 collection with voxpupuli's beaker_puppet_helpers, since beaker-puppet only installs puppet-agent. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Fable 5.2 Assisted-by: Claude Opus 5.5 --- .github/actions/presuite.rb | 23 ++++------------ .github/workflows/ci.yaml | 2 +- acceptance/Gemfile | 1 + acceptance/pre-suite/install_openvox_agent.rb | 26 +++++++++++++++++++ 4 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 acceptance/pre-suite/install_openvox_agent.rb diff --git a/.github/actions/presuite.rb b/.github/actions/presuite.rb index 569331ff0..74516d55d 100644 --- a/.github/actions/presuite.rb +++ b/.github/actions/presuite.rb @@ -5,7 +5,7 @@ def if_no_env_vars_set_defaults ENV['FACTER_ROOT'] = __dir__.gsub('/.github/actions', '') unless ENV['FACTER_ROOT'] - ENV['RELEASE_STREAM'] = 'puppet8' unless ENV['RELEASE_STREAM'] + ENV['RELEASE_STREAM'] = 'openvox9' unless ENV['RELEASE_STREAM'] end def install_facter_acceptance_dependencies @@ -42,23 +42,10 @@ def platform_with_options(platform) "#{platform}{hypervisor=none\\,hostname=localhost}" end -def install_puppet_agent - message('INSTALL PUPPET AGENT') +def install_openvox_agent + message('INSTALL OPENVOX AGENT') - beaker_puppet_root = run('bundle info beaker-puppet --path') - - # Bundler/Rubygems can sometimes give output other than the filepath (deprecation warnings, etc.) - begin - if File.exist?(beaker_puppet_root.chomp) - presuite_file_path = File.join(beaker_puppet_root.chomp, 'setup', 'aio', '010_Install_Puppet_Agent.rb') - - run("beaker exec pre-suite --pre-suite #{presuite_file_path} --preserve-state", './', env_path_var) - else - exit - end - rescue SystemExit - puts "`bundle info beaker-puppet --path` produced unexpected output, please address this." - end + run('beaker exec pre-suite --pre-suite pre-suite/install_openvox_agent.rb --preserve-state', './', env_path_var) end def puppet_puppet_bin_dir @@ -151,7 +138,7 @@ def verify_facter_standalone_exits_0 Dir.chdir(ACCEPTANCE_PATH) do install_facter_acceptance_dependencies initialize_beaker - install_puppet_agent + install_openvox_agent install_facter run_acceptance_tests end diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b62d8b35a..7fcbc8e7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -116,7 +116,7 @@ jobs: env: BEAKER_debug: true FACTER_ROOT: facter - RELEASE_STREAM: puppet8 + RELEASE_STREAM: openvox9 steps: - name: Checkout current PR diff --git a/acceptance/Gemfile b/acceptance/Gemfile index 2cdce4a61..30105ba86 100644 --- a/acceptance/Gemfile +++ b/acceptance/Gemfile @@ -12,6 +12,7 @@ end gem "beaker", *location_for(ENV['BEAKER_VERSION'] || "~> 7") gem 'beaker-puppet', *location_for(ENV['BEAKER_PUPPET_VERSION'] || "~> 4") +gem 'beaker_puppet_helpers', *location_for(ENV['BEAKER_PUPPET_HELPERS_VERSION'] || "~> 3.3") gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || "~> 3") gem "beaker-vagrant", *location_for(ENV['BEAKER_VAGRANT_VERSION'] || "~> 2") gem "rake", ">= 12.3.3" diff --git a/acceptance/pre-suite/install_openvox_agent.rb b/acceptance/pre-suite/install_openvox_agent.rb new file mode 100644 index 000000000..97d5cfd99 --- /dev/null +++ b/acceptance/pre-suite/install_openvox_agent.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# beaker-puppet only installs Perforce's puppet-agent, so openvox-agent comes +# from voxpupuli's beaker_puppet_helpers. Only its install code is loaded, +# because its DSL would replace the beaker-puppet helpers of the same names. +require 'beaker_puppet_helpers/install_utils' +require 'beaker_puppet_helpers/windows_utils' + +test_name('install openvox-agent') do + extend BeakerPuppetHelpers::WindowsUtils + + collection = ENV.fetch('RELEASE_STREAM') + + agents.each do |agent| + if agent['platform'].include?('windows') + install_msi_on(agent, collection) + else + BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(agent, collection) + agent.install_package(BeakerPuppetHelpers::InstallUtils.collection2packagename(agent, collection)) + end + end + + # Puts the agent's bin directories on the PATH that Beaker gives to the + # commands of the tests. + configure_type_defaults_on(agents) +end From a0a1fe2414d07e88fc47883df33723f8c9169edf Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Sat, 14 Nov 2026 00:44:03 +0000 Subject: [PATCH 2/9] Describe the acceptance host from the runner The presuite asked beaker-hostgenerator for a host named after the runner, so a runner on a new macOS or Windows release needed a generator release first, and macos-15, an arm64 runner, came out as x86_64. The presuite now writes the one host itself, with the platform built from the runner's name and, on macOS, the machine's architecture. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- .github/actions/presuite.rb | 38 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/actions/presuite.rb b/.github/actions/presuite.rb index 74516d55d..f8633aaf4 100644 --- a/.github/actions/presuite.rb +++ b/.github/actions/presuite.rb @@ -1,7 +1,9 @@ # frozen_string_literal: true +require 'etc' require 'open3' require 'fileutils' +require 'yaml' def if_no_env_vars_set_defaults ENV['FACTER_ROOT'] = __dir__.gsub('/.github/actions', '') unless ENV['FACTER_ROOT'] @@ -14,32 +16,28 @@ def install_facter_acceptance_dependencies end def initialize_beaker - beaker_platform_with_options = platform_with_options(beaker_platform) - message('BEAKER INITIALIZE') - run("beaker init -h #{beaker_platform_with_options} -o #{File.join('config', 'aio', 'options.rb')}") + File.write('hosts.yaml', { 'HOSTS' => { 'localhost' => beaker_host } }.to_yaml) + run("beaker init -h hosts.yaml -o #{File.join('config', 'aio', 'options.rb')}") message('BEAKER PROVISION') run('beaker provision') end -def beaker_platform - { - 'ubuntu-22.04' => 'ubuntu2204-64a', - 'ubuntu-24.04' => 'ubuntu2404-64a', - 'macos-13' => 'osx13-64a', - 'macos-14' => 'osx14-64a', - 'macos-15' => 'osx15-64a', - 'windows-2016' => 'windows2016-64a', - 'windows-2019' => 'windows2019-64a', - 'windows-2022' => 'windows2022-64a', - }[HOST_PLATFORM] -end - -def platform_with_options(platform) - return "\"#{platform}{hypervisor=none,hostname=localhost,is_cygwin=false}\"" if platform.include? 'windows' - - "#{platform}{hypervisor=none\\,hostname=localhost}" +# The runner is the only host. Its platform comes from the runner's name, so a +# new runner needs no beaker-hostgenerator release that knows its OS version. +def beaker_host + os, version = HOST_PLATFORM.split('-') + host = case os + when 'macos' + { 'platform' => "osx-#{version}-#{Etc.uname[:machine]}" } + when 'windows' + { 'platform' => "windows-#{version}-64", 'packaging_platform' => 'windows-2012-x64', + 'ruby_arch' => 'x64', 'is_cygwin' => false } + when 'ubuntu' + { 'platform' => "ubuntu-#{version}-amd64" } + end + host.merge('hypervisor' => 'none', 'roles' => ['agent']) end def install_openvox_agent From 0e936000c26a4059519bd538a5ced6837f5a4163 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Sat, 14 Nov 2026 00:45:05 +0000 Subject: [PATCH 3/9] Run the acceptance tests on windows-2025 and ubuntu-26.04 Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7fcbc8e7c..06716a9fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -109,8 +109,10 @@ jobs: matrix: os: - windows-2022 + - windows-2025 - ubuntu-22.04 - ubuntu-24.04 + - ubuntu-26.04 fail-fast: false runs-on: ${{ matrix.os }} env: From d89d4ac2a0f2f7b1b4786db56fce9ecc9d8a6abd Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Sat, 14 Nov 2026 00:46:36 +0000 Subject: [PATCH 4/9] Run the acceptance tests on macOS beaker_puppet_helpers can't install on macOS, so a workflow step installs the collection's newest release DMG from downloads.voxpupuli.org with hdiutil and installer, as the openvox suite's macOS cells do, and the pre-suite leaves macOS hosts alone. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- .github/workflows/ci.yaml | 18 ++++++++++++++++++ acceptance/pre-suite/install_openvox_agent.rb | 3 +++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 06716a9fa..8b4031de2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -113,6 +113,10 @@ jobs: - ubuntu-22.04 - ubuntu-24.04 - ubuntu-26.04 + - macos-15 + - macos-15-intel + - macos-26 + - macos-26-intel fail-fast: false runs-on: ${{ matrix.os }} env: @@ -157,6 +161,20 @@ jobs: primary_interface=`route -n get default | awk '/interface: */{print $NF}'` sudo ifconfig $primary_interface inet6 add ::1/64 + # beaker_puppet_helpers can't install on macOS, so this installs the + # newest release DMG of the collection, as the openvox suite does + - name: Install openvox-agent on macOS + if: runner.os == 'macOS' + shell: bash + run: | + url="https://downloads.voxpupuli.org/mac/${RELEASE_STREAM}" + dmg=$(curl --fail --silent --show-error "${url}/" | + grep -o "openvox-agent-[0-9.]*-1\.macos\.all\.$(uname -m)\.dmg" | sort -u -V | tail -n 1) + curl --fail --silent --show-error --location --output "${RUNNER_TEMP}/openvox-agent.dmg" "${url}/${dmg}" + sudo hdiutil attach "${RUNNER_TEMP}/openvox-agent.dmg" -nobrowse -mountpoint /Volumes/openvox-agent + sudo installer -pkg /Volumes/openvox-agent/*.pkg -target / + /opt/puppetlabs/bin/puppet --version + - name: Run acceptance tests on Linux and MacOS platform if: runner.os != 'Windows' run: sudo -E "PATH=$PATH" ruby $FACTER_ROOT/.github/actions/presuite.rb ${{ matrix.os }} diff --git a/acceptance/pre-suite/install_openvox_agent.rb b/acceptance/pre-suite/install_openvox_agent.rb index 97d5cfd99..886ed3aef 100644 --- a/acceptance/pre-suite/install_openvox_agent.rb +++ b/acceptance/pre-suite/install_openvox_agent.rb @@ -12,6 +12,9 @@ collection = ENV.fetch('RELEASE_STREAM') agents.each do |agent| + # beaker_puppet_helpers can't install on macOS, so the workflow does + next if agent['platform'].start_with?('osx') + if agent['platform'].include?('windows') install_msi_on(agent, collection) else From 2a6049e475449a2ee9feb574219654a9e1569788 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Mon, 16 Nov 2026 07:06:52 +0000 Subject: [PATCH 5/9] Expect the Ruby that OpenVox 9 ships in the acceptance tests OpenVox 9 agents run Ruby 4.0. Its error messages quote names with a straight quote instead of a backtick, and its Windows build reports x64-mingw-ucrt, while the tests expected Ruby 3, the backtick and x64-mingw32 from Perforce's puppet-agent 8. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- .../custom_facts/error_in_custom_file_does_not_affect_api.rb | 2 +- .../custom_facts/error_in_custom_file_does_not_affect_cli.rb | 2 +- acceptance/tests/facts/ruby.rb | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_api.rb b/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_api.rb index 60b89c4cb..6bc0447a7 100644 --- a/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_api.rb +++ b/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_api.rb @@ -101,7 +101,7 @@ def create_api_call_file(test_vars, facter_querry) step "Agent #{agent}: Verify that an error is outputted when custom fact file has an error" do create_api_call_file(test_vars, "Facter.value('custom_fact_1')") on(agent, "#{ruby_command(agent)} #{test_vars[:test_script_path]}") do |ruby_result| - assert_match(/Facter.*error while resolving custom facts in .*file1.rb undefined local variable or method `nill'/, + assert_match(/Facter.*error while resolving custom facts in .*file1.rb undefined local variable or method [`']nill'/, ruby_result.stdout) end end diff --git a/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_cli.rb b/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_cli.rb index a44f4becf..ae613a335 100644 --- a/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_cli.rb +++ b/acceptance/tests/custom_facts/error_in_custom_file_does_not_affect_cli.rb @@ -82,7 +82,7 @@ def create_custom_fact_file(file_name, file_content, fact_dir, agent) step "Agent #{agent}: Verify that an error is outputted when custom fact file has an error" do on(agent, facter('custom_fact_4', environment: env), acceptable_exit_codes: [1]) do |facter_output| - assert_match(/ERROR Facter.*error while resolving custom facts in .*file1.rb undefined local variable or method `nill'/, + assert_match(/ERROR Facter.*error while resolving custom facts in .*file1.rb undefined local variable or method [`']nill'/, facter_output.stderr.chomp) end end diff --git a/acceptance/tests/facts/ruby.rb b/acceptance/tests/facts/ruby.rb index 46cfaa3ed..b22cc0315 100644 --- a/acceptance/tests/facts/ruby.rb +++ b/acceptance/tests/facts/ruby.rb @@ -16,13 +16,15 @@ puppet_version = on(agent, puppet("--version")).stdout.chomp ruby_version = if puppet_version =~ /^7\./ /2\.\d+\.\d+/ + elsif puppet_version =~ /^9\./ + /4\.\d+\.\d+/ else /3\.\d+\.\d+/ end case agent['platform'] when /windows/ - ruby_platform = agent['ruby_arch'] == 'x64' ? 'x64-mingw32' : 'i386-mingw32' + ruby_platform = agent['ruby_arch'] == 'x64' ? /x64-mingw(32|-ucrt)/ : 'i386-mingw32' when /osx/ if agent['platform'] =~ /arm64/ if puppet_version =~ /^7\./ && agent['platform'].split('-')[1].to_i < 13 From f0e3f1550fdaac12a7265489ad88abde758a77a8 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Mon, 16 Nov 2026 07:07:57 +0000 Subject: [PATCH 6/9] Take the Windows Server version from the platform name The test listed each Windows Server release it knew, so windows-2025 failed with "Unknown Windows version" although openfact reports 2025. It now reads the year from the platform, so a new Windows Server runner needs no change here. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- acceptance/lib/facter/acceptance/base_fact_utils.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/acceptance/lib/facter/acceptance/base_fact_utils.rb b/acceptance/lib/facter/acceptance/base_fact_utils.rb index c78983092..b9a4b35e1 100644 --- a/acceptance/lib/facter/acceptance/base_fact_utils.rb +++ b/acceptance/lib/facter/acceptance/base_fact_utils.rb @@ -431,12 +431,8 @@ def windows_expected_facts(agent) os_version = '10' elsif agent['platform'] =~ /-11/ os_version = '11' - elsif agent['platform'] =~ /2016/ - os_version = '2016' - elsif agent['platform'] =~ /2019/ - os_version = '2019' - elsif agent['platform'] =~ /2022/ - os_version = '2022' + elsif agent['platform'] =~ /windows-(20\d\d)/ + os_version = Regexp.last_match(1) else fail_test "Unknown Windows version #{agent['platform']}" end From 7400b4b6dc7ded37eae51181e0b7e5a445868dec Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Mon, 16 Nov 2026 07:09:38 +0000 Subject: [PATCH 7/9] Add the ifconfig interface fields to the fact schema b48cd3de1 added flags, rdomain, description and groups to networking.interfaces but not to the schema, which CONTRIBUTING.md asks for and which the schema acceptance test checks, so that test failed on macOS. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Opus 5.5 --- lib/schema/facter.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/schema/facter.yaml b/lib/schema/facter.yaml index 6dc2bde52..3b2a5a963 100644 --- a/lib/schema/facter.yaml +++ b/lib/schema/facter.yaml @@ -1036,12 +1036,21 @@ networking: bindings6: type: array description: The array of IPv6 address bindings for the interface. + description: + type: string + description: The description of the network interface, as reported by ifconfig. dhcp: type: ip description: The DHCP server for the network interface. duplex: type: string description: The duplex settings for physical network interfaces on Linux using /sys/class/net. + flags: + type: array + description: The flags of the network interface, as reported by ifconfig. + groups: + type: array + description: The interface groups that the network interface belongs to, as reported by ifconfig. ip: type: ip description: The IPv4 address for the network interface. @@ -1072,6 +1081,9 @@ networking: physical: type: boolean description: Return whether network interface is a physical device on Linux based systems. + rdomain: + type: integer + description: The routing domain of the network interface, as reported by ifconfig. scope6: type: string description: The IPv6 scope for the network interface. From 83a491afe0f965a845281f838a8c450f76d97221 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:14:02 +0000 Subject: [PATCH 8/9] Stop running dhclient in the acceptance job Hosted runners kept losing contact with GitHub during this step, which runs dhclient on every interface. Its lease went unused. The 22.04 and 24.04 logs show openfact reading networking.dhcp from systemd-networkd's lease file, which it looks at before any dhclient lease. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Fable 5.2 --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8b4031de2..d99ce3b87 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -147,12 +147,6 @@ jobs: sudo chmod a-w /home/runner /usr/share && sudo chmod -R a-w /home/runner/.config /home/linuxbrew - - name: Install dhclient for Linux - if: runner.os == 'Linux' - run: | - sudo apt install isc-dhcp-client - sudo dhclient - # IPv6 is missing on the GitHub macOS image and we need it for the networking facts tests # https://github.com/actions/runner-images/issues/668 - name: Add IPv6 on macOS From 5ddf5c3c18e4e6ea84dbebb6e6d109eeb49c8881 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:14:02 +0000 Subject: [PATCH 9/9] Match CPU model names in any case on Ubuntu and Windows A windows-2022 runner reported its CPU as "INTEL(R) XEON(R) PLATINUM 8573C", which the case-sensitive pattern did not match. Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com> Assisted-by: Claude Fable 5.2 --- acceptance/lib/facter/acceptance/base_fact_utils.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acceptance/lib/facter/acceptance/base_fact_utils.rb b/acceptance/lib/facter/acceptance/base_fact_utils.rb index b9a4b35e1..8a3917651 100644 --- a/acceptance/lib/facter/acceptance/base_fact_utils.rb +++ b/acceptance/lib/facter/acceptance/base_fact_utils.rb @@ -387,7 +387,7 @@ def ubuntu_expected_facts(agent) if agent['platform'] =~ /x86_64|amd64/ os_arch = 'amd64' os_hardware = 'x86_64' - processor_model_pattern = /(Intel\(R\).*)|(AMD.*)/ + processor_model_pattern = /(Intel\(R\).*)|(AMD.*)/i elsif agent['platform'] =~ /aarch64/ os_arch = 'aarch64' os_hardware = 'aarch64' @@ -455,7 +455,7 @@ def windows_expected_facts(agent) 'processors.count' => /[1-9]/, 'processors.physicalcount' => /[1-9]/, 'processors.isa' => /x86|x64/, - 'processors.models' => /(Intel\(R\).*)|(AMD.*)/, + 'processors.models' => /(Intel\(R\).*)|(AMD.*)/i, 'kernel' => 'windows', 'kernelrelease' => /\d+\.\d+/, 'kernelversion' => /\d+\.\d+/,