diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 47ae675d..7f35c3e0 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -11,6 +11,8 @@ concurrency: jobs: integration-tests: + permissions: + contents: read uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main secrets: inherit with: diff --git a/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 b/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 index c0381b85..90deb4a2 100644 --- a/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 +++ b/app/src/github_runner_image_builder/templates/cloud-init.sh.j2 @@ -83,7 +83,6 @@ EOF function install_apt_packages() { local packages="$1" - local hwe_version="$2" # The gh package (GitHub CLI application) is not in the APT repository for focal. # For focal, the apt repository of GitHub is added. @@ -104,11 +103,6 @@ function install_apt_packages() { DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get upgrade -y echo "Installing apt packages $packages" DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get install -y --no-install-recommends ${packages} - # Skip installing the HWE kernel package on resolute since there is no HWE kernel for it. - if [ $RELEASE != "resolute" ]; then - echo "Installing linux-generic-hwe-${hwe_version}" - DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get install -y --install-recommends linux-generic-hwe-${hwe_version} - fi } function disable_unattended_upgrades() { @@ -231,7 +225,6 @@ function configure_system_users() { proxy="{{ PROXY }}" apt_packages="{{ APT_PACKAGES }}" -hwe_version="{{ HWE_VERSION }}" github_runner_version="{{ RUNNER_VERSION }}" github_runner_arch="{{ RUNNER_ARCH }}" runner_binary_repo="{{ RUNNER_BINARY_REPO }}" @@ -242,7 +235,7 @@ configure_proxy "$proxy" if [ "$github_runner_arch" == "arm" ]; then enable_armhf_multiarch fi -install_apt_packages "$apt_packages" "$hwe_version" +install_apt_packages "$apt_packages" disable_unattended_upgrades enable_network_fair_queuing_congestion configure_usr_local_bin diff --git a/app/tests/integration/commands.py b/app/tests/integration/commands.py index 7b02109c..71c0dd38 100644 --- a/app/tests/integration/commands.py +++ b/app/tests/integration/commands.py @@ -64,12 +64,6 @@ class Commands: Commands( name="test sctp support", command="sudo apt-get install lksctp-tools -yq && checksctp" ), - # Exclude 26.04 from HWE kernel test since there is no HWE kernel for it. - Commands( - name="test that HWE kernel is installed (only for non-resolute)", - command="lsb_release -r | grep 26.04 || uname -a | " - "grep $(dpkg -l | grep linux-generic-hwe | awk '{print $3}' | cut -d'.' -f1-3)", - ), Commands( name="test network congestion policy(fq)", command="sudo sysctl -a | grep 'net.core.default_qdisc = fq'", diff --git a/app/tests/unit/test_openstack_builder.py b/app/tests/unit/test_openstack_builder.py index 759271c2..4812a886 100644 --- a/app/tests/unit/test_openstack_builder.py +++ b/app/tests/unit/test_openstack_builder.py @@ -706,7 +706,6 @@ def test__generate_cloud_init_script( if arch == openstack_builder.Arch.ARM else openstack_builder.BaseImage.JAMMY ) - expected_hwe = openstack_builder.BaseImage.get_version(base) assert ( openstack_builder._generate_cloud_init_script( image_config=openstack_builder.config.ImageConfig( @@ -811,7 +810,6 @@ def test__generate_cloud_init_script( function install_apt_packages() {{ local packages="$1" - local hwe_version="$2" # The gh package (GitHub CLI application) is not in the APT repository for focal. # For focal, the apt repository of GitHub is added. @@ -835,11 +833,6 @@ def test__generate_cloud_init_script( DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get upgrade -y echo "Installing apt packages $packages" DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get install -y --no-install-recommends ${{packages}} - # Skip installing the HWE kernel package on resolute since there is no HWE kernel for it. - if [ $RELEASE != "resolute" ]; then - echo "Installing linux-generic-hwe-${{hwe_version}}" - DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get install -y --install-recommends linux-generic-hwe-${{hwe_version}} - fi }} function disable_unattended_upgrades() {{ @@ -963,7 +956,6 @@ def test__generate_cloud_init_script( proxy="test.proxy.internal:3128" apt_packages="{expected_apt_packages}" -hwe_version="{expected_hwe}" github_runner_version="" github_runner_arch="{arch.value}" runner_binary_repo="canonical/github-actions-runner" @@ -974,7 +966,7 @@ def test__generate_cloud_init_script( if [ "$github_runner_arch" == "arm" ]; then enable_armhf_multiarch fi -install_apt_packages "$apt_packages" "$hwe_version" +install_apt_packages "$apt_packages" disable_unattended_upgrades enable_network_fair_queuing_congestion configure_usr_local_bin diff --git a/docs/changelog.md b/docs/changelog.md index 02573a62..4cb5f607 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -32,6 +32,10 @@ - Update integration tests that were intentionally not done in #185. +## [#196 fix: use default kernel instead of HWE kernel](https://github.com/canonical/github-runner-image-builder-operator/pull/196) (2026-02-12) + +* Use the default kernel instead of the HWE kernel in GitHub runner images. + ## [#185 Remove aproxy installation and add proxy support in workload](https://github.com/canonical/github-runner-image-builder-operator/pull/185) (2026-01-20) - Remove `aproxy` snap installation in the charm and inject proxy values from the model config into the workload process.