Skip to content

Commit 4502feb

Browse files
authored
[chore][CI] Reducing qemu and Ubuntu 20.04 usage (#6053)
* Remove issue 16450 from CI * Try previous version of amazon2 image * Revert "Try previous version of amazon2 image" This reverts commit 37092c2. * Use ubuntu-24.04 and fallback when needed * Fix expression * Fix expression * Fallback to the correct version * Leverage exclude and fix suffix * Fix linux-package-test workflow * Delete extra line in linux-package-test * Fix slat-test * Fix puppet-test * Fix auto-instrumentation
1 parent 76c026c commit 4502feb

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

.github/workflows/auto-instrumentation.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,21 @@ jobs:
9494
distro=$(for d in $dockerfiles; do echo -n "\"$d\","; done)
9595
arch="\"amd64\", \"arm64\""
9696
testcase="\"express\",\"tomcat\",\"dotnet\""
97-
exclude='{"ARCH": "arm64", "TESTCASE": "dotnet"}' # splunk-otel-dotnet currently not supported on arm64
97+
# splunk-otel-dotnet currently not supported on arm64
98+
# amazonlinux-2 requires cgroup v1, only available on version 20.04 that doesn't have an arm runner
99+
# opensuse-12 (leap 42) does not support arm64
100+
exclude='{"ARCH": "arm64", "TESTCASE": "dotnet"},{"DISTRO": "opensuse-12", "ARCH": "arm64"},{"DISTRO": "amazonlinux-2", "ARCH": "arm64"}'
98101
matrix="{\"DISTRO\": [${distro%,}], \"ARCH\": [${arch}], \"TESTCASE\": [${testcase}], \"exclude\": [${exclude}]}"
99102
echo "$matrix" | jq
100103
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
101104
outputs:
102105
matrix: ${{ steps.get-matrix.outputs.matrix }}
103106

104107
test-package:
105-
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
106-
runs-on: ${{ fromJSON('["ubuntu-20.04", "ubuntu-22.04"]')[matrix.DISTRO == 'amazonlinux-2023'] }}
108+
# Amazon Linux 2 and OpenSUSE 12 use cgroup v1
109+
# Ubuntu 24.04 uses cgroup v2
110+
# Fallback to Ubuntu 20.04 when the matrix.DISRO is one of these two above
111+
runs-on: ubuntu-${{ (matrix.DISTRO != 'amazonlinux-2' && matrix.DISTRO != 'opensuse-12') && '24.04' || '20.04' }}${{ matrix.ARCH == 'arm64' && '-arm' || '' }}
107112
timeout-minutes: 60
108113
needs: [cross-compile, build-package, test-package-matrix]
109114
strategy:
@@ -134,12 +139,6 @@ jobs:
134139
name: splunk-otel-auto-instrumentation-${{ matrix.ARCH }}-${{ env.SYS_PACKAGE }}
135140
path: ./instrumentation/dist
136141

137-
- uses: docker/setup-qemu-action@v3
138-
if: ${{ matrix.ARCH != 'amd64' }}
139-
with:
140-
platforms: ${{ matrix.ARCH }}
141-
image: tonistiigi/binfmt:qemu-v7.0.0
142-
143142
- name: Setup python
144143
uses: actions/setup-python@v5
145144
with:

.github/workflows/installer-script-test.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,20 @@ jobs:
3838
distro=$(for d in $dockerfiles; do echo -n "\"$d\","; done)
3939
arch='"amd64","arm64"'
4040
instrumentation='"none","preload","systemd"'
41-
exclude='{"DISTRO": "opensuse-12", "ARCH": "arm64"}' # opensuse-12 (leap 42) does not support arm64
41+
# opensuse-12 (leap 42) does not support arm64
42+
# amazonlinux-2 requires cgroup v1, only available on version 20.04 that doesn't have an arm runner
43+
exclude='{"DISTRO": "opensuse-12", "ARCH": "arm64"},{"DISTRO": "amazonlinux-2", "ARCH": "arm64"}'
4244
matrix="{\"DISTRO\": [${distro%,}], \"ARCH\": [${arch}], \"INSTRUMENTATION\": [${instrumentation}], \"exclude\": [${exclude}]}"
4345
echo "$matrix" | jq
4446
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
4547
outputs:
4648
matrix: ${{ steps.get-matrix.outputs.matrix }}
4749

4850
linux-installer-script-test:
49-
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
50-
runs-on: ${{ fromJSON('["ubuntu-20.04", "ubuntu-22.04"]')[matrix.DISTRO == 'amazonlinux-2023'] }}
51+
# Amazon Linux 2 and OpenSUSE 12 use cgroup v1
52+
# Ubuntu 24.04 uses cgroup v2
53+
# Fallback to Ubuntu 20.04 when the matrix.DISRO is one of these two above
54+
runs-on: ubuntu-${{ (matrix.DISTRO != 'amazonlinux-2' && matrix.DISTRO != 'opensuse-12') && '24.04' || '20.04' }}${{ matrix.ARCH == 'arm64' && '-arm' || '' }}
5155
timeout-minutes: 90
5256
needs: installer-test-matrix
5357
strategy:
@@ -61,12 +65,6 @@ jobs:
6165
- name: Check out the codebase.
6266
uses: actions/checkout@v4
6367

64-
- uses: docker/setup-qemu-action@v3
65-
if: ${{ matrix.ARCH != 'amd64' }}
66-
with:
67-
platforms: ${{ matrix.ARCH }}
68-
image: tonistiigi/binfmt:qemu-v7.0.0
69-
7068
- name: Setup python
7169
uses: actions/setup-python@v5
7270
with:

.github/workflows/linux-package-test.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,20 @@ jobs:
151151
fi
152152
distro=$(for d in $dockerfiles; do echo -n "\"$d\","; done)
153153
arch="\"amd64\", \"arm64\""
154-
matrix="{\"DISTRO\": [${distro%,}], \"ARCH\": [${arch}]}"
154+
# opensuse-12 (leap 42) does not support arm64
155+
# amazonlinux-2 and tar-centos-7 require cgroup v1, only available on version 20.04 that doesn't have an arm runner
156+
exclude='{"DISTRO": "opensuse-12", "ARCH": "arm64"},{"DISTRO": "amazonlinux-2", "ARCH": "arm64"},{"DISTRO": "tar-centos-7", "ARCH": "arm64"}'
157+
matrix="{\"DISTRO\": [${distro%,}], \"ARCH\": [${arch}], \"exclude\": [${exclude}]}"
155158
echo "$matrix" | jq
156159
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
157160
outputs:
158161
matrix: ${{ steps.get-matrix.outputs.matrix }}
159162

160163
test-package:
161-
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
162-
runs-on: ${{ fromJSON('["ubuntu-20.04", "ubuntu-22.04"]')[matrix.DISTRO == 'amazonlinux-2023'] }}
164+
# Amazon Linux 2, OpenSUSE 12, and centos7 use cgroup v1
165+
# Ubuntu 24.04 uses cgroup v2
166+
# Fallback to Ubuntu 20.04 when the matrix.DISRO is one of these two above
167+
runs-on: ubuntu-${{ (matrix.DISTRO != 'amazonlinux-2' && matrix.DISTRO != 'opensuse-12' && matrix.DISTRO != 'tar-centos-7') && '24.04' || '20.04' }}${{ matrix.ARCH == 'arm64' && '-arm' || '' }}
163168
timeout-minutes: 30
164169
needs: [build-package, test-package-matrix]
165170
strategy:
@@ -185,12 +190,6 @@ jobs:
185190
name: ${{ env.SYS_PACKAGE }}-${{ matrix.ARCH }}-package
186191
path: ./dist
187192

188-
- uses: docker/setup-qemu-action@v3
189-
if: ${{ matrix.ARCH != 'amd64' }}
190-
with:
191-
platforms: ${{ matrix.ARCH }}
192-
image: tonistiigi/binfmt:qemu-v7.0.0
193-
194193
- name: Setup python
195194
uses: actions/setup-python@v5
196195
with:

.github/workflows/puppet-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ jobs:
8080

8181
puppet-test:
8282
name: puppet-test
83-
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
84-
runs-on: ${{ fromJSON('["ubuntu-20.04", "ubuntu-22.04"]')[matrix.DISTRO == 'amazonlinux-2023'] }}
83+
# Amazon Linux 2 and OpenSUSE 12 use cgroup v1
84+
# Ubuntu 24.04 uses cgroup v2
85+
# Fallback to Ubuntu 20.04 when the matrix.DISRO is one of these two above
86+
runs-on: ubuntu-${{ (matrix.DISTRO != 'amazonlinux-2' && matrix.DISTRO != 'opensuse-12') && '24.04' || '20.04' }}
8587
timeout-minutes: 60
8688
needs:
8789
- puppet-lint

.github/workflows/salt-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ jobs:
6868

6969
salt-test:
7070
name: salt-test
71-
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
72-
runs-on: ${{ fromJSON('["ubuntu-20.04", "ubuntu-22.04"]')[matrix.DISTRO == 'amazonlinux-2023'] }}
71+
# Amazon Linux 2 uses cgroup v1
72+
# Ubuntu 24.04 uses cgroup v2
73+
# Fallback to Ubuntu 20.04 when needed
74+
runs-on: ${{ fromJSON('["ubuntu-24.04", "ubuntu-20.04"]')[matrix.DISTRO == 'amazonlinux-2'] }}
7375
timeout-minutes: 60
7476
needs: [salt-lint-test, salt-test-matrix]
7577
strategy:

0 commit comments

Comments
 (0)