Skip to content

ci: pin integration tests to Cacti 1.2.31 - #776

Open
somethingwithproof wants to merge 5 commits into
Cacti:developfrom
somethingwithproof:ci/thold-cacti-1-2-31
Open

ci: pin integration tests to Cacti 1.2.31#776
somethingwithproof wants to merge 5 commits into
Cacti:developfrom
somethingwithproof:ci/thold-cacti-1-2-31

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented Jul 13, 2026

Copy link
Copy Markdown
Member

Pins the Cacti checkout used by the integration workflow to release/1.2.31, so CI exercises the compatibility target the plugin declares (compat = 1.2.25) instead of a moving development branch.

The three follow-up commits make the workflow's optional steps conditional. Pinning to a release means .phpstan.neon, include/vendor/bin and the lint / phpcsfixer composer scripts are not always present, and their absence should skip the step rather than fail the job.

Why this matters right now

Every open pull request in this repository is currently red on all four integration jobs, for a reason that has nothing to do with any of them. cli/install_cacti.php on Cacti develop dies before printing anything:

PHP Fatal error: Uncaught Error: Call to undefined function __()
  in cacti/lib/functions.php:7975
#1 include/global.php(700): get_cacti_version_text()

Merging this turns them all green, because release/1.2.31 predates that bug. The upstream fix is Cacti/cacti#7751 if you would rather wait for it.

Keeping an eye on develop anyway

Pinning has a cost: a regression in Cacti core stops being visible here. So the matrix carries one extra job that builds against develop and is marked continue-on-error.

It is already earning its keep — that job is red on this very pull request, and for the right reason:

PHP 8.1 ... against Cacti release/1.2.31 = pass
PHP 8.2 ... against Cacti release/1.2.31 = pass
PHP 8.3 ... against Cacti release/1.2.31 = pass
PHP 8.4 ... against Cacti release/1.2.31 = pass
PHP 8.4 ... against Cacti develop        = fail   (undefined function __())

Worth knowing before you merge: continue-on-error keeps the workflow green — the run's conclusion is success — but GitHub still renders that one check with a red mark in the pull request UI. The job name says which Cacti it built against, so the distinction is visible, but if a red mark on an advisory job is unwelcome I am happy to move it into its own workflow instead.

Rebased on develop. The Apache PHP package change this branch used to carry belongs to #777, which has since merged.

@somethingwithproof

Copy link
Copy Markdown
Member Author

Re-verified: branch is up to date with develop (no rebase needed), all 4 Integration Test checks currently pass, no open Copilot review threads. No changes needed.

@somethingwithproof
somethingwithproof marked this pull request as ready for review August 17, 2026 01:28
Copilot AI lite review requested due to automatic review settings August 17, 2026 01:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the Cacti repository checkout used by the GitHub Actions integration workflow to the Cacti 1.2.31 release line, and makes several workflow steps resilient when optional tooling/config files are absent in that pinned checkout.

Changes:

  • Pin the actions/checkout of Cacti/cacti to release/1.2.31.
  • Make PHPStan config adjustment conditional on .phpstan.neon existing.
  • Guard vendor-bin chmod and optional Composer script steps (lint, phpcsfixer) so they can be skipped when not defined.
Suppressed comments (1)

.github/workflows/plugin-ci-workflow.yml:215

  • Same issue as the lint step: ^ phpcsfixer assumes a specific indentation in Composer output and may skip the step unexpectedly. Match leading whitespace more flexibly and disable ANSI formatting.
        if composer run-script --list | grep -qE '^  phpcsfixer'; then

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

run: sed '/plugins/d' -i .phpstan.neon
run: |
if [ -f .phpstan.neon ]; then
sed '/plugins/d' -i .phpstan.neon
- name: Run Linter on base code
run: composer run-script lint ${{ github.workspace }}/cacti/plugins/thold
run: |
if composer run-script --list | grep -qE '^ lint'; then
Comment thread .github/workflows/plugin-ci-workflow.yml Outdated
@somethingwithproof

Copy link
Copy Markdown
Member Author

Live evidence for this one: Cacti develop is currently broken for the CLI install path, so every unpinned integration run in this repo is failing.

PHP Fatal error: Uncaught Error: Call to undefined function __()
  in cacti/lib/functions.php:7973

format_cacti_version_text() calls __() before the translation layer loads (Cacti develop 96033267c). This PR is green because it pins to release/1.2.31; #788, which does not, fails all four matrix jobs on that same error.

@TheWitness TheWitness left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sed comment

Pinning the checkout makes the suite exercise the compatibility contract the
plugin declares, but it also means a regression in Cacti develop stops being
visible here. One advisory job restores that signal: it builds against develop
and is marked continue-on-error, so it reports without turning the plugin's own
pull requests red.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants