From a876add256edc7678ecb56e4cfd35a5bc7778805 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Wed, 18 Nov 2026 16:12:18 +1000 Subject: [PATCH 1/2] ci: unload host mosquitto AppArmor profile on Ubuntu 26.04 runners Ubuntu 26.04 runners (now ubuntu-latest) load /etc/apparmor.d/mosquitto in enforce mode. Containers share the host's AppArmor, so the profile also confines mosquitto in the privileged test container and denies it access to /etc/tedge/mosquitto-conf/, which makes `tedge reconnect c8y` fail. Unload that profile on the runner before running the tests. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0059fb..68e9365 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -140,6 +140,18 @@ jobs: run: | just venv + # Ubuntu 26.04 runners enforce a host AppArmor profile for mosquitto. Containers + # share the host's AppArmor, so it also confines mosquitto inside the privileged + # test container and blocks it from reading /etc/tedge/mosquitto-conf/. + - name: Unload host AppArmor profile for mosquitto + run: | + if [ -f /etc/apparmor.d/mosquitto ]; then + sudo apparmor_parser -R /etc/apparmor.d/mosquitto + echo "Unloaded AppArmor profile: mosquitto" + else + echo "No mosquitto AppArmor profile on this runner; nothing to do" + fi + - name: Run tests run: just test ${{ matrix.job.test_options }} From 73dd04d6e0c786aeeb91e07085a6296e5a9669e2 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Wed, 18 Nov 2026 16:14:11 +1000 Subject: [PATCH 2/2] ci: run lint with Python 3.11 Python 3.9 is not available for Ubuntu 26.04 in actions/setup-python. Use 3.11, which the system tests already use. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 44f5944..9ff1236 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.11' cache: 'pip' cache-dependency-path: | requirements.txt