Skip to content

Commit cf1666c

Browse files
authored
Merge branch 'main' into main
2 parents 1e8e851 + 0ce5271 commit cf1666c

234 files changed

Lines changed: 525 additions & 241 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/acceptance.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
name: Beaker OpenVox Acceptance Tests
33
run-name: |-
4-
Beaker acceptance tests of openvox for
4+
Beaker acceptance tests of openvox
5+
on ${{ inputs.guest-arch }} runners for
56
${{ inputs.pre-release-build && 'pre-release' || 'release' }}
67
packages of openvox-agent
78
${{ (inputs.pre-release-build && inputs.openvox-agent-version) ||
@@ -80,6 +81,20 @@ on:
8081
true)
8182
default: 'https://s3.osuosl.org/openvox-artifacts'
8283
type: string
84+
guest-arch:
85+
description: |-
86+
The architecture of the guest VMs to run the acceptance tests
87+
on. This is used by the nested_vms action to determine which
88+
VM images to use.
89+
90+
If not provided, the default is x86_64.
91+
92+
NOTE: Currently only x86_64 *runners* support nested
93+
virtualization, so if guest-arch is set to arm64, the
94+
nested_vms will run under qemu and be quite a bit slower
95+
(5x-20x).
96+
type: string
97+
default: 'x86_64'
8398

8499
permissions:
85100
contents: read
@@ -103,3 +118,4 @@ jobs:
103118
openvox-server-version: ${{ inputs.openvox-server-version }}
104119
openvox-server-pre-release-build: ${{ inputs.pre-release-build }}
105120
artifacts-url: ${{ inputs.artifacts-url }}
121+
guest-arch: ${{ inputs.guest-arch }}

.github/workflows/backport.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ jobs:
4040
git config --global commit.gpgsign true
4141
git config --global tag.gpgsign true
4242
- name: Checkout repository
43-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
43+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4444
with:
4545
token: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }}
46+
ref: main
4647
- name: Create backport pull requests
4748
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
4849
with:

.github/workflows/gem_release.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
name: Build the gem
1616
runs-on: ubuntu-24.04
1717
steps:
18-
- uses: actions/checkout@v6
18+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1919
- name: Install Ruby
20-
uses: ruby/setup-ruby@v1
20+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0
2121
with:
2222
ruby-version: 'ruby'
2323
- name: Build gem
2424
shell: bash
2525
run: gem build --verbose *.gemspec
2626
- name: Upload gem to GitHub cache
27-
uses: actions/upload-artifact@v7
27+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
2828
with:
2929
name: gem-artifact
3030
path: '*.gem'
@@ -39,7 +39,7 @@ jobs:
3939
contents: write # clone repo and create release
4040
steps:
4141
- name: Download gem from GitHub cache
42-
uses: actions/download-artifact@v8
42+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
4343
with:
4444
name: gem-artifact
4545
- name: Create Release
@@ -56,7 +56,7 @@ jobs:
5656
packages: write # publish to rubygems.pkg.github.com
5757
steps:
5858
- name: Download gem from GitHub cache
59-
uses: actions/download-artifact@v8
59+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
6060
with:
6161
name: gem-artifact
6262
- name: Publish gem to GitHub packages
@@ -73,10 +73,10 @@ jobs:
7373
id-token: write # rubygems.org authentication
7474
steps:
7575
- name: Download gem from GitHub cache
76-
uses: actions/download-artifact@v8
76+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
7777
with:
7878
name: gem-artifact
79-
- uses: rubygems/configure-rubygems-credentials@v2.0.0
79+
- uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0
8080
- name: Publish gem to rubygems.org
8181
shell: bash
8282
run: gem push *.gem
@@ -92,11 +92,11 @@ jobs:
9292
- release-to-rubygems
9393
steps:
9494
- name: Download gem from GitHub cache
95-
uses: actions/download-artifact@v8
95+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
9696
with:
9797
name: gem-artifact
9898
- name: Install Ruby
99-
uses: ruby/setup-ruby@v1
99+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0
100100
with:
101101
ruby-version: 'ruby'
102102
- name: Wait for release to propagate

.github/workflows/promote.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v6
34+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3535
with:
3636
ref: ${{ inputs.branch }}
3737
token: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }}
@@ -86,7 +86,7 @@ jobs:
8686
cat "packaging/configs/components/${component}.json"
8787
8888
- name: Create Pull Request
89-
uses: peter-evans/create-pull-request@v8
89+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
9090
with:
9191
commit-message: "Promote ${{ inputs.component }} ${{ inputs.ref }} into ${{ inputs.branch }}"
9292
branch: "promote/${{ inputs.branch }}/${{ inputs.component }}/${{ inputs.ref }}"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-24.04
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v6
26+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2727
with:
2828
ref: ${{ inputs.base-branch }}
2929

.github/workflows/tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
runs-on: ${{ matrix.cfg.os }}
2626
steps:
2727
- name: Checkout current PR
28-
uses: actions/checkout@v6
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929

3030
- name: Install ruby version ${{ matrix.cfg.ruby }}
31-
uses: ruby/setup-ruby@v1
31+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0
3232
with:
3333
ruby-version: ${{ matrix.cfg.ruby }}
3434
bundler-cache: true
@@ -58,10 +58,10 @@ jobs:
5858
runs-on: ${{ matrix.cfg.os }}
5959
steps:
6060
- name: Checkout current PR
61-
uses: actions/checkout@v6
61+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6262

6363
- name: Install ruby version ${{ matrix.cfg.ruby }}
64-
uses: ruby/setup-ruby@v1
64+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0
6565
with:
6666
ruby-version: ${{ matrix.cfg.ruby }}
6767
bundler-cache: true
@@ -117,11 +117,11 @@ jobs:
117117
steps:
118118
# needs fetch-depth because the packaging dem reads old git tags
119119
- name: Checkout current PR
120-
uses: actions/checkout@v6
120+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
121121
with:
122122
fetch-depth: 0
123123
- name: Install Ruby version 3.3
124-
uses: ruby/setup-ruby@v1
124+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1.314.0
125125
with:
126126
ruby-version: 3.3
127127
bundler-cache: true

acceptance/pre-suite/010_set_puppetserver_memory_defaults.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
end
1313

1414
if half_mem > 2048
15-
on(master, "sed -i -E -e '/^JAVA_ARGS=/ s/-Xms[0-9]+[m|g] -Xmx[0-9]+[m|g]/-Xms#{half_mem}m -Xmx#{half_mem}m/' #{defaults_dir}/puppetserver")
15+
mem_regex = "-Xms[0-9]+[m|g][[:blank:]]+-Xmx[0-9]+[m|g]"
16+
mem_replacement = "-Xms#{half_mem}m -Xmx#{half_mem}m"
17+
on(master, <<~EOS)
18+
sed -i -E \
19+
-e '/^JAVA_ARGS=/ s/#{mem_regex}/#{mem_replacement}/' \
20+
#{defaults_dir}/puppetserver
21+
EOS
1622
on(master, "cat #{defaults_dir}/puppetserver")
1723
else
1824
logger.info("System memory on the primary is less than 4GB (#{(mem_in_bytes.to_i / megabytes)}m). Leaving the defult 2GB for Puppetserver memory.")
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
test_name 'Set Puppetserver start and reload timeouts' do
2+
skip_test 'No primary node to configure Puppetserver timeouts for' unless master
3+
4+
start_timeout = options['puppetserver-start-timeout']
5+
reload_timeout = options['puppetserver-reload-timeout']
6+
skip_test 'No timeout options specified, skipping' if (start_timeout.nil? && reload_timeout.nil?)
7+
8+
# Update the defaults used internally by the puppetserver
9+
# service scripts.
10+
defaults_dir = case master.platform
11+
when /debian|ubuntu/ then '/etc/default'
12+
else '/etc/sysconfig'
13+
end
14+
15+
exprs = []
16+
exprs << "-e '/^START_TIMEOUT=/ s/=.*$/=#{start_timeout}/'" if !start_timeout.nil?
17+
exprs << "-e '/^RELOAD_TIMEOUT=/ s/=.*$/=#{reload_timeout}/'" if !reload_timeout.nil?
18+
on(master, "sed -i #{exprs.join(' ')} #{defaults_dir}/puppetserver")
19+
on(master, "cat #{defaults_dir}/puppetserver")
20+
21+
# And update the defaults used by the systemd service unit.
22+
# Puppetserver will effectively timeout a start at whichever
23+
# is shorter...
24+
if !start_timeout.nil?
25+
dropin_dir = '/etc/systemd/system/puppetserver.service.d'
26+
on(master, <<~EOS)
27+
mkdir -p #{dropin_dir}
28+
printf '[Service]\\nTimeoutStartSec=#{start_timeout}\\n' \
29+
> #{dropin_dir}/timeouts.conf
30+
EOS
31+
on(master, 'systemctl daemon-reload')
32+
on(master, 'systemctl cat puppetserver.service')
33+
end
34+
end

acceptance/tests/agent/agent_disable_lockfile.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# The validation of the `vardir` at the OS level
44
# should be accomplished in another test.
55
'audit:high',
6-
'audit:refactor' # This test should not require a master. Remove the use of `with_puppet_running_on`.
6+
'audit:refactor', # This test should not require a master. Remove the use of `with_puppet_running_on`.
7+
'shard:group1' # For splitting out groups of tests for slow test runners
78

89
#
910
# This test is intended to ensure that puppet agent --enable/--disable

acceptance/tests/agent/agent_fails_with_unknown_resource.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_name "agent run should fail if it finds an unknown resource type" do
22
tag 'audit:high',
3-
'audit:integration'
3+
'audit:integration',
4+
'shard:group2' # For splitting out groups of tests for slow test runners
45

56
require 'puppet/acceptance/common_utils'
67

0 commit comments

Comments
 (0)