From e859d9fde09ccc2c68f7897e206a52b19fed3763 Mon Sep 17 00:00:00 2001 From: Saurabh Pandit Date: Thu, 6 Aug 2026 17:40:24 +0530 Subject: [PATCH] (PA-8998) Require a puppet9 master for the puppet8->9 upgrade test puppetserver 9-nightly builds are now available (confirmed against artifactory for el-9-x86_64, our master platform), so tighten require_master_collection from 'min: puppet8' to 'min: puppet9' to properly exercise the upgrade against a real puppet9 master instead of falling back to a puppet8 one. Also updates the now-stale Rakefile comment describing UPGRADE_TARGET_COLLECTION, which cited the same "puppetserver-9 nightlies aren't yet published" rationale. Co-Authored-By: Claude Sonnet 5 --- acceptance/Rakefile | 7 +++---- .../tests/test_upgrade_puppet8_to_puppet9.rb | 16 +++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/acceptance/Rakefile b/acceptance/Rakefile index 0fc3ba03..1fa6d048 100644 --- a/acceptance/Rakefile +++ b/acceptance/Rakefile @@ -55,10 +55,9 @@ task :ci do Rake.application['prepare'].invoke # UPGRADE_TARGET_COLLECTION selects which upgrade test to run, defaulting to # MASTER_COLLECTION. Override when the master must be on an older stream than - # the upgrade target — e.g. testing puppet8→9 agent upgrades with a puppet8 - # master because puppetserver-9 nightlies aren't yet published. Treat blank - # env values as unset; an empty string is truthy in Ruby and would otherwise - # mask the MASTER_COLLECTION fallback. + # the upgrade target -- e.g. to deliberately test a puppet9 agent upgrade + # against an older master. Treat blank env values as unset; an empty string + # is truthy in Ruby and would otherwise mask the MASTER_COLLECTION fallback. upgrade_target = ENV['UPGRADE_TARGET_COLLECTION'].to_s.strip upgrade_target = ENV['MASTER_COLLECTION'].to_s.strip if upgrade_target.empty? case upgrade_target diff --git a/acceptance/tests/test_upgrade_puppet8_to_puppet9.rb b/acceptance/tests/test_upgrade_puppet8_to_puppet9.rb index ac0eed2a..fcf82a02 100644 --- a/acceptance/tests/test_upgrade_puppet8_to_puppet9.rb +++ b/acceptance/tests/test_upgrade_puppet8_to_puppet9.rb @@ -6,11 +6,17 @@ # Tests FOSS upgrades from the latest Puppet 8 (the puppet8-nightly collection) # to the latest puppet9-nightly build. test_name 'puppet_agent class: Upgrade agents from puppet8 to puppet9' do - # puppet9-nightly puppetserver may not yet be published; accept a puppet8 or - # newer master so the test can run while agents are upgraded to puppet9. - # puppet_collection_for(:puppetserver, ...) returns bare 'puppet8'/'puppet9' - # (no -nightly suffix), so compare against the bare collection name. - require_master_collection min: 'puppet8' + # puppetserver 9-nightly builds are now available (PA-8998), so require an + # actual puppet9 master to properly exercise the upgrade instead of falling + # back to a puppet8 master. puppet_collection_for(:puppetserver, ...) returns + # bare 'puppet8'/'puppet9' (no -nightly suffix), so compare against the bare + # collection name. + # + # Note puppetserver 9-nightly platform coverage differs from puppet8-nightly + # (some platforms were dropped, others added) -- if the master platform in + # hosts.yaml changes, confirm a puppetserver9-nightly build still exists for + # it before relying on this. + require_master_collection min: 'puppet9' exclude_pe_upgrade_platforms # Both passing-agent-SHAs lookups have to succeed; if VPN/network flaps and