From f2674a76b5b92dc893cbf60e99ac7dba7a758560 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Sep 2025 14:40:41 +0200 Subject: [PATCH 1/2] CI: Adjust tests for GitHub runner The group within the github image is `runner`, not `docker`. --- spec/integration/transport/local_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/transport/local_spec.rb b/spec/integration/transport/local_spec.rb index cde851aff..822a91c9a 100644 --- a/spec/integration/transport/local_spec.rb +++ b/spec/integration/transport/local_spec.rb @@ -83,7 +83,7 @@ def make_target expect(runner.upload(target, file.path, dest, run_as: user).message).to match(/Uploaded/) expect(runner.run_command(target, "cat #{dest}", run_as: user)['stdout']).to eq(contents) expect(runner.run_command(target, "stat -c %U #{dest}", run_as: user)['stdout'].chomp).to eq(user) - expect(runner.run_command(target, "stat -c %G #{dest}", run_as: user)['stdout'].chomp).to eq('docker') + expect(runner.run_command(target, "stat -c %G #{dest}", run_as: user)['stdout'].chomp).to eq('runner') end runner.run_command(target, "rm #{dest}", sudoable: true, run_as: user) From 7a91ff7b92f4b4112cf19321dc9caf399b323771 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Sep 2025 14:32:15 +0200 Subject: [PATCH 2/2] Drop warning when using bolt as a gem In the past people complained a lot about this warning and I don't see a reason why it's there, so we can just remove it. If you use the gem instead of packages, we assume a certain level of knowledge. --- Gemfile | 3 --- lib/bolt/cli.rb | 18 ------------------ spec/unit/cli_spec.rb | 18 ------------------ 3 files changed, 39 deletions(-) diff --git a/Gemfile b/Gemfile index 4df2917a4..e71101d8c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,9 +5,6 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' # Disable analytics when running in development ENV['BOLT_DISABLE_ANALYTICS'] = 'true' -# Disable warning that Bolt may be installed as a gem -ENV['BOLT_GEM'] = 'true' - gemspec # Optional paint gem for rainbow outputter diff --git a/lib/bolt/cli.rb b/lib/bolt/cli.rb index 803cf32a2..13d500505 100644 --- a/lib/bolt/cli.rb +++ b/lib/bolt/cli.rb @@ -466,7 +466,6 @@ def execute(options) # FINALIZING SETUP # - check_gem_install warn_inventory_overrides_cli(config, options) submit_screen_view(analytics, config, inventory, options) options[:targets] = process_target_list(plugins, @rerun, options) @@ -769,23 +768,6 @@ def execute(options) content end - # Check and warn if Bolt is installed as a gem. - # - private def check_gem_install - if ENV['BOLT_GEM'].nil? && incomplete_install? - msg = <<~MSG.chomp - Bolt might be installed as a gem. To use Bolt reliably and with all of its - dependencies, uninstall the 'bolt' gem and install Bolt as a package: - https://puppet.com/docs/bolt/latest/bolt_installing.html - - If you meant to install Bolt as a gem and want to disable this warning, - set the BOLT_GEM environment variable. - MSG - - Bolt::Logger.warn("gem_install", msg) - end - end - # Print a fatal error. Print using the outputter if it's configured. # Otherwise, mock the output by printing directly to stdout. # diff --git a/spec/unit/cli_spec.rb b/spec/unit/cli_spec.rb index 9857776f3..2358daddf 100644 --- a/spec/unit/cli_spec.rb +++ b/spec/unit/cli_spec.rb @@ -485,24 +485,6 @@ end end - describe 'checking for gem install' do - it 'displays a warning when Bolt is installed as a gem' do - with_env_vars('BOLT_GEM' => nil) do - allow(cli).to receive(:incomplete_install?).and_return(true) - expect(Bolt::Logger).to receive(:warn).with('gem_install', anything) - cli.execute({}) - end - end - - it 'does not display a warning when BOLT_GEM is set' do - with_env_vars('BOLT_GEM' => 'true') do - allow(cli).to receive(:incomplete_install?).and_return(true) - cli.execute({}) - expect(Bolt::Logger).not_to receive(:warn).with('gem_install', anything) - end - end - end - describe 'analytics' do before(:each) do allow(cli).to receive(:submit_screen_view).and_call_original