From 23f45cc4ea8d38cf5e83c8bab2f7a39eca264ca8 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 7 Nov 2026 15:28:43 -0500 Subject: [PATCH 1/8] ci: add non-blocking PHP 8.5 and 8.6 matrix legs Mirror Cacti/cacti#8633: run PHP 8.5 and 8.6 as experimental (non-blocking) matrix legs via continue-on-error so bleeding-edge toolchain gaps do not turn CI red. PHP 8.5 is provisioned through shivammathur/setup-php as usual. PHP 8.6 is still pre-release and the setup-php nightly ships ABI-skewed bundled extensions, so the 8.6 leg provisions a coherent CLI from Ondrej Sury's PPA instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/plugin-ci-workflow.yml | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index d5cce385..ad9d518c 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -45,12 +45,23 @@ jobs: integration-test: timeout-minutes: 45 runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: php: ['8.2', '8.3', '8.4'] os: [ubuntu-latest] + experimental: [false] + include: + # PHP 8.5 and 8.6 run as non-blocking (experimental) legs because + # their packages can lag on the runners and in Ondřej Surý's PPA. + - php: '8.5' + os: ubuntu-latest + experimental: true + - php: '8.6' + os: ubuntu-latest + experimental: true services: mariadb: @@ -88,6 +99,7 @@ jobs: fetch-depth: 0 - name: Install PHP ${{ matrix.php }} + if: matrix.php != '8.6' uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: php-version: ${{ matrix.php }} @@ -96,6 +108,41 @@ jobs: ini-values: "post_max_size=256M, max_execution_time=60, date.timezone=America/New_York" coverage: xdebug + # PHP 8.6 is still pre-release. shivammathur/setup-php ships a nightly + # 8.6.0-dev build whose bundled extensions are ABI-skewed against their own + # core (undefined symbol: smart_str_ferealloc / _safe_femalloc), so every + # extension fails to load and the CLI install dies. Ondřej Surý's PPA + # provides a coherent 8.6 RC build, so this experimental leg provisions the + # CLI from there instead. + - name: Install PHP 8.6 toolchain from Ondřej Surý's PPA + if: matrix.php == '8.6' + run: | + set -euo pipefail + sudo add-apt-repository -y ppa:ondrej/php + sudo apt-get update + sudo apt-get install -y \ + php8.6-cli php8.6-common \ + php8.6-intl php8.6-mysql php8.6-gd php8.6-ldap \ + php8.6-gmp php8.6-xml php8.6-curl php8.6-mbstring \ + php8.6-snmp php8.6-sqlite3 + # Make the Ondřej 8.6 CLI the default `php` so composer and the tests + # run under the same ABI-coherent build. + sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.6 86 + sudo update-alternatives --set php /usr/bin/php8.6 + # Mirror the ini values the other legs receive via setup-php. + printf '%s\n' \ + 'post_max_size=256M' \ + 'max_execution_time=60' \ + 'date.timezone=America/New_York' \ + | sudo tee /etc/php/8.6/cli/conf.d/99-cacti-ci.ini >/dev/null + # setup-php normally provides Composer; it is skipped for this leg, so + # make sure a Composer binary is available for the dependency steps. + if ! command -v composer >/dev/null 2>&1; then + sudo apt-get install -y composer + fi + php -v + composer --version + - name: Check PHP version run: php -v From 654788c697cd3faf283ba6993e8ab2cff6bec69a Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 7 Nov 2026 15:34:07 -0500 Subject: [PATCH 2/8] ci: --- .github/workflows/plugin-ci-workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index ad9d518c..8b8bfd8c 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -125,6 +125,10 @@ jobs: php8.6-intl php8.6-mysql php8.6-gd php8.6-ldap \ php8.6-gmp php8.6-xml php8.6-curl php8.6-mbstring \ php8.6-snmp php8.6-sqlite3 + # Install a coverage driver so the patch-coverage gate can run; the + # setup-php legs get xdebug via `coverage: xdebug`. Non-fatal in case + # the PPA briefly lacks the matching 8.6 build. + sudo apt-get install -y php8.6-xdebug || true # Make the Ondřej 8.6 CLI the default `php` so composer and the tests # run under the same ABI-coherent build. sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.6 86 From 3b33dfe4522673e7232c514b9d6229e896c898b6 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 7 Nov 2026 15:38:53 -0500 Subject: [PATCH 3/8] ci: skip patch-coverage gate on the 8.6 leg (no coverage driver) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Ondřej PPA has no php8.6-xdebug build yet, so the experimental 8.6 leg has no coverage driver and the patch-coverage gate cannot read a clover report. All 8.6 tests pass, so skip only the coverage-enforcement step on 8.6; the 8.5 leg keeps it (setup-php provides xdebug there). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/plugin-ci-workflow.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 8b8bfd8c..d302bfa9 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -125,10 +125,6 @@ jobs: php8.6-intl php8.6-mysql php8.6-gd php8.6-ldap \ php8.6-gmp php8.6-xml php8.6-curl php8.6-mbstring \ php8.6-snmp php8.6-sqlite3 - # Install a coverage driver so the patch-coverage gate can run; the - # setup-php legs get xdebug via `coverage: xdebug`. Non-fatal in case - # the PPA briefly lacks the matching 8.6 build. - sudo apt-get install -y php8.6-xdebug || true # Make the Ondřej 8.6 CLI the default `php` so composer and the tests # run under the same ABI-coherent build. sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.6 86 @@ -261,7 +257,9 @@ jobs: # inside a live Cacti. What is enforceable is that a change covers the # lines it adds. - name: Enforce coverage of changed lines - if: github.event_name == 'pull_request' + # PHP 8.6 installs from the Ondřej PPA, which has no matching xdebug + # build yet, so there is no coverage driver on that experimental leg. + if: github.event_name == 'pull_request' && matrix.php != '8.6' env: BASE_REF: ${{ github.event.pull_request.base.sha }} run: | From 9a1d4abe708ca6a31f126990817fd5141c3a59a3 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 7 Nov 2026 16:00:37 -0500 Subject: [PATCH 4/8] ci: build xdebug via PECL on the 8.6 leg; restore coverage gate Experiment: provide a real coverage driver on the pre-release 8.6 leg by building Xdebug from PECL (Xdebug >= 3.5 supports PHP 8.5/8.6), since the Ondrej PPA has no php8.6-xdebug package yet. With a driver present the patch-coverage gate and coverage-dependent tests run the same as the setup-php legs, so the 8.6 coverage-skip is removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/plugin-ci-workflow.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index d302bfa9..22dedca7 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -129,6 +129,21 @@ jobs: # run under the same ABI-coherent build. sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.6 86 sudo update-alternatives --set php /usr/bin/php8.6 + # Ondřej's PPA has no prebuilt php8.6-xdebug yet, so build it from PECL + # (Xdebug >= 3.5 supports PHP 8.5/8.6). This gives the 8.6 leg a real + # coverage driver so the patch-coverage gate and coverage-dependent + # tests work the same as the setup-php legs. + sudo apt-get install -y php8.6-dev php-pear autoconf gcc make pkg-config + sudo update-alternatives --install /usr/bin/phpize phpize /usr/bin/phpize8.6 86 + sudo update-alternatives --set phpize /usr/bin/phpize8.6 + sudo update-alternatives --install /usr/bin/php-config php-config /usr/bin/php-config8.6 86 + sudo update-alternatives --set php-config /usr/bin/php-config8.6 + yes '' | sudo pecl install -f xdebug || true + EXTDIR=$(php -r 'echo ini_get("extension_dir");') + if [ -f "$EXTDIR/xdebug.so" ]; then + printf '%s\n' 'zend_extension=xdebug.so' 'xdebug.mode=coverage' \ + | sudo tee /etc/php/8.6/cli/conf.d/20-xdebug.ini >/dev/null + fi # Mirror the ini values the other legs receive via setup-php. printf '%s\n' \ 'post_max_size=256M' \ @@ -257,9 +272,7 @@ jobs: # inside a live Cacti. What is enforceable is that a change covers the # lines it adds. - name: Enforce coverage of changed lines - # PHP 8.6 installs from the Ondřej PPA, which has no matching xdebug - # build yet, so there is no coverage driver on that experimental leg. - if: github.event_name == 'pull_request' && matrix.php != '8.6' + if: github.event_name == 'pull_request' env: BASE_REF: ${{ github.event.pull_request.base.sha }} run: | From 8f87b91453830bb7607bd64e6e7de7b236e070c2 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 7 Nov 2026 16:04:09 -0500 Subject: [PATCH 5/8] ci: skip patch-coverage gate on the 8.6 leg (no coverage driver exists) Xdebug does not support PHP 8.6 yet (Xdebug 3.5.3 requires < 8.6.0) and the Ondrej PPA ships no php8.6-xdebug, so the 8.6 leg has no coverage driver at all. Skip only the coverage-enforcement step on 8.6; the 8.5 leg keeps it via setup-php's xdebug. Reverts the PECL build experiment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/plugin-ci-workflow.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 22dedca7..d302bfa9 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -129,21 +129,6 @@ jobs: # run under the same ABI-coherent build. sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.6 86 sudo update-alternatives --set php /usr/bin/php8.6 - # Ondřej's PPA has no prebuilt php8.6-xdebug yet, so build it from PECL - # (Xdebug >= 3.5 supports PHP 8.5/8.6). This gives the 8.6 leg a real - # coverage driver so the patch-coverage gate and coverage-dependent - # tests work the same as the setup-php legs. - sudo apt-get install -y php8.6-dev php-pear autoconf gcc make pkg-config - sudo update-alternatives --install /usr/bin/phpize phpize /usr/bin/phpize8.6 86 - sudo update-alternatives --set phpize /usr/bin/phpize8.6 - sudo update-alternatives --install /usr/bin/php-config php-config /usr/bin/php-config8.6 86 - sudo update-alternatives --set php-config /usr/bin/php-config8.6 - yes '' | sudo pecl install -f xdebug || true - EXTDIR=$(php -r 'echo ini_get("extension_dir");') - if [ -f "$EXTDIR/xdebug.so" ]; then - printf '%s\n' 'zend_extension=xdebug.so' 'xdebug.mode=coverage' \ - | sudo tee /etc/php/8.6/cli/conf.d/20-xdebug.ini >/dev/null - fi # Mirror the ini values the other legs receive via setup-php. printf '%s\n' \ 'post_max_size=256M' \ @@ -272,7 +257,9 @@ jobs: # inside a live Cacti. What is enforceable is that a change covers the # lines it adds. - name: Enforce coverage of changed lines - if: github.event_name == 'pull_request' + # PHP 8.6 installs from the Ondřej PPA, which has no matching xdebug + # build yet, so there is no coverage driver on that experimental leg. + if: github.event_name == 'pull_request' && matrix.php != '8.6' env: BASE_REF: ${{ github.event.pull_request.base.sha }} run: | From bbab884dee6a65d38380b9f7ff53a54d7b3215f4 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Sat, 7 Nov 2026 19:00:48 -0800 Subject: [PATCH 6/8] fix(ci): run the poller with the shared RRD group Use the runner effective group alongside the www-data user so newly created RRD files match the existing CI directory ownership. Covers flat and structured RRD paths without changing directory modes or suppressing warnings. Signed-off-by: Thomas Vincent --- .github/workflows/plugin-ci-workflow.yml | 2 +- CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index d302bfa9..a7a9eb25 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -319,7 +319,7 @@ jobs: - name: Run Cacti Poller run: | cd ${{ github.workspace }}/cacti - sudo -u www-data php poller.php --poller=1 --force --debug + sudo runuser -u www-data -g runner -- php poller.php --poller=1 --force --debug if ! grep -q "SYSTEM STATS" log/cacti.log; then echo "Cacti poller did not finish successfully" diff --git a/CHANGELOG.md b/CHANGELOG.md index 52d89130..4b88f648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## ChangeLog --- develop --- +* dev: Run the CI poller with the shared runner group so RRD files and structured directories pass permission verification * issue: Shorten the VRULE graph drilldown button title so it reads cleanly as a label in Cacti's graph action menu, using two complete 'Toggle Threshold VRULES On'/'Off' strings (keeping the Threshold reference) so the label stays grammatical across translations * issue: Log each template import error using its own message (#757) * bug: Element-qualify the `.thold-pill` CSS so it outranks the single-class theme rules (e.g. `.deviceUpFull` `width:14%`) that were clipping the pill to a fixed width; status pills now size to their label on the Device Status page and everywhere else From a1b53b372b2db9d241b45e335d7291d16224473b Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sun, 8 Nov 2026 10:19:59 -0500 Subject: [PATCH 7/8] ci: pin PHP 8.6 leg to ubuntu-24.04 ubuntu-latest has rolled to Ubuntu 26.04 (Resolute). Ondrej Surys Launchpad PPA (ppa:ondrej/php) has no Release file for the resolute suite yet (it is migrating to packages.sury.org), so apt-get update 404s and the experimental 8.6 PPA toolchain install dies with exit code 100. Pin the experimental 8.6 leg to ubuntu-24.04 (Noble), which still serves the latest packaged 8.6 release candidate from the PPA. The other legs use shivammathur/setup-php and are unaffected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/plugin-ci-workflow.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index a7a9eb25..7de92c99 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -59,8 +59,11 @@ jobs: - php: '8.5' os: ubuntu-latest experimental: true + # Pinned to Ubuntu 24.04 (Noble): ubuntu-latest is now Ubuntu 26.04 + # (Resolute), which Ondrej Sury's PPA does not yet serve, so the 8.6 + # PPA toolchain install 404s. Noble carries the latest packaged 8.6 RC. - php: '8.6' - os: ubuntu-latest + os: ubuntu-24.04 experimental: true services: From 60417dcbd1b7b5f0a1d3c1ecada7d0e410871995 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sun, 8 Nov 2026 10:41:58 -0500 Subject: [PATCH 8/8] ci: make PHP 8.5 a required (non-experimental) matrix leg Move PHP 8.5 from the non-blocking experimental include leg into the required base matrix. 8.5 is a stable release provisioned via shivammathur/setup-php like the other required legs, so it no longer needs continue-on-error. Only PHP 8.6 (still a pre-release installed from Ondrej Surys PPA, pinned to ubuntu-24.04) remains experimental. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/plugin-ci-workflow.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 7de92c99..7bcd5fdc 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -50,15 +50,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.2', '8.3', '8.4'] + php: ['8.2', '8.3', '8.4', '8.5'] os: [ubuntu-latest] experimental: [false] include: - # PHP 8.5 and 8.6 run as non-blocking (experimental) legs because - # their packages can lag on the runners and in Ondřej Surý's PPA. - - php: '8.5' - os: ubuntu-latest - experimental: true + # PHP 8.6 runs as a non-blocking (experimental) leg because + # its packages can lag on the runners and in Ondřej Surý's PPA. # Pinned to Ubuntu 24.04 (Noble): ubuntu-latest is now Ubuntu 26.04 # (Resolute), which Ondrej Sury's PPA does not yet serve, so the 8.6 # PPA toolchain install 404s. Noble carries the latest packaged 8.6 RC.