From bb1485c40778555f7da06929d7f131bb790526e6 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Sep 2025 15:23:40 +0200 Subject: [PATCH 1/7] CI: Run all tests on every PR This the past, the different jobs had filters and were only executed when specific files changed. This is error prone because we potentially forget to enable tests for specific changes. Since we've enough concurrent runners, we can run all jobs always. --- .github/workflows/apply.yaml | 17 +++++------------ .github/workflows/bolt_spec.yaml | 19 ++++++------------- .github/workflows/docker_transport.yaml | 1 + .github/workflows/linux.yaml | 17 +++++------------ .github/workflows/modules.yaml | 17 +++++------------ .github/workflows/pwsh.yaml | 12 +++++------- .github/workflows/schemas.yaml | 13 +++++-------- .github/workflows/ssh_transport.yaml | 17 +++++------------ .github/workflows/windows.yaml | 16 ++++------------ .github/workflows/winrm_transport.yaml | 17 +++++------------ 10 files changed, 46 insertions(+), 100 deletions(-) diff --git a/.github/workflows/apply.yaml b/.github/workflows/apply.yaml index 505553d24..ca5514ba9 100644 --- a/.github/workflows/apply.yaml +++ b/.github/workflows/apply.yaml @@ -1,18 +1,11 @@ +--- name: Apply on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/apply.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - lib/bolt/** - - libexec/** - - rakelib/tests.rake - - spec/** + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/bolt_spec.yaml b/.github/workflows/bolt_spec.yaml index 2926ec98a..5c0576a1d 100644 --- a/.github/workflows/bolt_spec.yaml +++ b/.github/workflows/bolt_spec.yaml @@ -1,19 +1,12 @@ +--- + name: BoltSpec on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/bolt_spec.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - lib/bolt/** - - lib/bolt_spec/** - - libexec/** - - rakelib/tests.rake - - spec/** + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/docker_transport.yaml b/.github/workflows/docker_transport.yaml index 61bdd6a3d..8205b771c 100644 --- a/.github/workflows/docker_transport.yaml +++ b/.github/workflows/docker_transport.yaml @@ -1,3 +1,4 @@ +--- name: Docker transport on: diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 16a05253e..6c60c537f 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -1,18 +1,11 @@ +--- name: Linux on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/linux.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - lib/bolt/** - - libexec/** - - rakelib/tests.rake - - spec/** + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/modules.yaml b/.github/workflows/modules.yaml index 403a0145f..63a00831f 100644 --- a/.github/workflows/modules.yaml +++ b/.github/workflows/modules.yaml @@ -1,18 +1,11 @@ +--- name: Modules on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/modules.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - bolt_spec_spec/** - - lib/bolt/** - - modules/** - - rakelib/tests.rake + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/pwsh.yaml b/.github/workflows/pwsh.yaml index 42dd47b48..4762c6bab 100644 --- a/.github/workflows/pwsh.yaml +++ b/.github/workflows/pwsh.yaml @@ -1,13 +1,11 @@ +--- name: pwsh on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/pwsh.yaml - - pwsh_module/* - - lib/bolt/bolt_option_parser.rb - - rakelib/pwsh.rake + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/schemas.yaml b/.github/workflows/schemas.yaml index 701379061..0a50e565b 100644 --- a/.github/workflows/schemas.yaml +++ b/.github/workflows/schemas.yaml @@ -1,14 +1,11 @@ +--- name: Schemas on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - lib/bolt/config/options.rb - - lib/bolt/config/transport/** - - lib/bolt/inventory/options.rb - - rakelib/schemas.rake - - schemas/*.json + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/ssh_transport.yaml b/.github/workflows/ssh_transport.yaml index e226ca399..f8d65b41d 100644 --- a/.github/workflows/ssh_transport.yaml +++ b/.github/workflows/ssh_transport.yaml @@ -1,18 +1,11 @@ +--- name: SSH Transport on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/ssh_transport.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - lib/bolt/** - - libexec/** - - rakelib/tests.rake - - spec/** + pull_request: {} + push: + branches: + - main permissions: contents: read diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 4577f2aaa..364d1551c 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -2,18 +2,10 @@ name: Windows on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/windows.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - lib/bolt/** - - libexec/** - - rakelib/tests.rake - - spec/** + pull_request: {} + push: + branches: + - main env: BOLT_WINRM_USER: roddypiper diff --git a/.github/workflows/winrm_transport.yaml b/.github/workflows/winrm_transport.yaml index 748eef3b8..29e498df8 100644 --- a/.github/workflows/winrm_transport.yaml +++ b/.github/workflows/winrm_transport.yaml @@ -1,18 +1,11 @@ +--- name: WinRM Transport on: - pull_request: - types: [opened, reopened, edited, synchronize] - paths: - - .github/workflows/winrm_transport.yaml - - bolt.gemspec - - Gemfile - - Puppetfile - - bolt-modules/** - - lib/bolt/** - - libexec/** - - rakelib/tests.rake - - spec/** + pull_request: {} + push: + branches: + - main permissions: contents: read From 95e509b2b7f780d8b137e7a5bdb93de11bafb5f7 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Sep 2025 14:40:41 +0200 Subject: [PATCH 2/7] 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 6a3d0c3ae032e49a939095b99d6db2e06bc02db3 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Sep 2025 15:33:35 +0200 Subject: [PATCH 3/7] bolt: Bump version from 5.0.0-rc2->5.1.0 -rc* makes the windows tests fail: ``` System.ArgumentException: The 'ModuleVersion' member is not valid in the module manifest file 'D:\a\openbolt\openbolt\pwsh_module\PuppetBolt\PuppetBolt.psd1': Cannot convert value "5.0.0-rc2" to type "System.Version". Error: "The input string '0-rc2' was not in a correct format." at , D:\a\openbolt\openbolt\pwsh_module\autogenerated.tests.ps1: line 1 at , C:\Users\runneradmin\Documents\PowerShell\Modules\Pester\5.7.1\Pester.psm1: line 3090 at Invoke-File, C:\Users\runneradmin\Documents\PowerShell\Modules\Pester\5.7.1\Pester.psm1: line 3099 at Invoke-BlockContainer, C:\Users\runneradmin\Documents\PowerShell\Modules\Pester\5.7.1\Pester.psm1: line 3008 at Discover-Test, C:\Users\runneradmin\Documents\PowerShell\Modules\Pester\5.7.1\Pester.psm1: line 1480 at Invoke-Test, C:\Users\runneradmin\Documents\PowerShell\Modules\Pester\5.7.1\Pester.psm1: line 2474 at Invoke-Pester, C:\Users\runneradmin\Documents\PowerShell\Modules\Pester\5.7.1\Pester.psm1: line 4960 at , D:\a\_temp\c04d9e53-3555-4e44-855d-5de95da6a5f0.ps1: line 2 at , : line 1 ``` --- lib/bolt/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bolt/version.rb b/lib/bolt/version.rb index b75833635..be6696259 100644 --- a/lib/bolt/version.rb +++ b/lib/bolt/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Bolt - VERSION = '5.0.0-rc2' + VERSION = '5.1.0' end From 3e22c781ea584f9e8e48e03bace76695b87dd8c2 Mon Sep 17 00:00:00 2001 From: Sebastian Rakel Date: Fri, 12 Sep 2025 21:19:02 +0200 Subject: [PATCH 4/7] CI: WinRM: Ignore ProgressAction parameter We have a test that verifies all the parameters that bolt subcommands offer in powershell. Besides the bolt-provided parameters, Powershell adds own/internals parameters as well. Powershell 7.5 introduced a new parameter, ProgressAction, which we need to add to the exclude list. https://learn.microsoft.com/de-de/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7.5 --- pwsh_module/command.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwsh_module/command.tests.ps1 b/pwsh_module/command.tests.ps1 index ef7070b89..07c242cf8 100644 --- a/pwsh_module/command.tests.ps1 +++ b/pwsh_module/command.tests.ps1 @@ -14,7 +14,7 @@ BeforeAll { $common = @( 'Version', 'Debug', 'ErrorAction', 'ErrorVariable', 'InformationAction', 'InformationVariable', 'OutBuffer', 'OutVariable', 'PipelineVariable', - 'Verbose', 'WarningAction', 'WarningVariable', 'Confirm', 'Whatif' + 'Verbose', 'WarningAction', 'WarningVariable', 'Confirm', 'Whatif', 'ProgressAction' ) } From 0e24354af23d20a37d34470f0606483bf4c37c38 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 Sep 2025 23:57:54 +0200 Subject: [PATCH 5/7] Revert "Allow ruby_smb 2.x and 3.x" This reverts commit 460e413039f81fbb4dabd0b0f0e5c98dd6f865e3. the CI passed in https://github.com/OpenVoxProject/openbolt/pull/41/. but the CI was flawed and the related winrm_transport check wasn't triggered, because it only runs when specific files changed. --- openbolt.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbolt.gemspec b/openbolt.gemspec index d3be7da01..ac762cc94 100644 --- a/openbolt.gemspec +++ b/openbolt.gemspec @@ -61,7 +61,7 @@ Gem::Specification.new do |spec| spec.add_dependency "puppetfile-resolver", ">= 0.6.2", "< 1.0" spec.add_dependency "puppet-resource_api", ">= 1.8.1" spec.add_dependency "r10k", ">= 3.10", "< 5" - spec.add_dependency "ruby_smb", ">= 1.0", "< 4.0.0" + spec.add_dependency "ruby_smb", "~> 1.0" spec.add_dependency "terminal-table", "~> 3.0" spec.add_dependency "winrm", "~> 2.0" spec.add_dependency "winrm-fs", "~> 1.3" From 1efd1c24d21752783e41cf02baaea7cfe25d6551 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sat, 13 Sep 2025 10:32:30 +0200 Subject: [PATCH 6/7] CI: Cleanup linux integration tests This fixes a regression introduced in 573cdb5454f360306bd5ebd6aa88256724f07a3c / https://github.com/OpenVoxProject/openbolt/pull/28. We run bolt on a couple of containers and valid the resultset. A Puppet 6 container was removed, but the test still expected the result from that. This wasn't noticed in CI, because the tests were only executed when specific files changed, and that wasn't triggered in this specific case. We cleaned up CI and all jobs now run always. --- spec/integration/container_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/container_spec.rb b/spec/integration/container_spec.rb index ef3a28a08..b1eba2522 100644 --- a/spec/integration/container_spec.rb +++ b/spec/integration/container_spec.rb @@ -38,7 +38,7 @@ users = result.map do |hash| hash.dig('value', 'report', 'resource_statuses').keys end.flatten - expect(users).to eq(["Notify[root\n]", "Notify[root\n]"]) + expect(users).to eq(["Notify[root\n]"]) end end end From 8da48f509ae5a933174d05faf8a257258dc04bec Mon Sep 17 00:00:00 2001 From: Austin Blatt Date: Sun, 14 Sep 2025 10:26:50 -0700 Subject: [PATCH 7/7] parallel test: change port value to puppet_7_node Use the port value for puppet_7_node, which is now used in testing instead of puppet_6_node. This plan is tightly coupled with the test in spec/integration/parallel_spec.rb "finishes executing the block then raises an error when there's an error". In 573cdb5454f360306bd5ebd6aa88256724f07a3c the puppet 6 node was removed from testing and the puppet 7 node was used to replace it. This plan relied on matching the port value of the puppet 6 node to decide to run a failing task, but the puppet 7 node has a different port number. --- spec/fixtures/parallel/parallel/plans/error.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/fixtures/parallel/parallel/plans/error.pp b/spec/fixtures/parallel/parallel/plans/error.pp index f43769616..f92c9f189 100644 --- a/spec/fixtures/parallel/parallel/plans/error.pp +++ b/spec/fixtures/parallel/parallel/plans/error.pp @@ -3,7 +3,7 @@ ) { $ts = get_targets($targets) parallelize($ts) |$t| { - if $t.port == 20024 { + if $t.port == 20025 { run_task('error::fail', $t) } else { run_task('parallel', $t, 'time' => 0, 'val' => 'a')