Skip to content

ci: fail workflow on FATAL/ERROR/WARNING in Cacti log - #385

Merged
TheWitness merged 4 commits into
developfrom
ci/check-log-for-issues
Sep 16, 2026
Merged

TheWitness merged 4 commits into
developfrom
ci/check-log-for-issues

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Adds a new step after View Cacti Logs that greps the full cacti.log for the strings FATAL:, ERROR:, WARNING: and fails the job if any are found.

Copilot AI lite review requested due to automatic review settings September 15, 2026 12:59

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.

🟡 Changes recommended

Handle grep read failures separately so the log is always validated.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a CI check that fails when cacti.log contains FATAL:, ERROR:, or WARNING: entries.

Changes:

  • Scans the Cacti log after displaying it.
  • Reports matches and fails the workflow.
File summaries
File Summary
.github/workflows/plugin-ci-workflow.yml Adds Cacti log error detection; grep read errors may currently be treated as successful checks.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread .github/workflows/plugin-ci-workflow.yml Outdated
xmacan
xmacan previously approved these changes Sep 15, 2026
bmfmancini
bmfmancini previously approved these changes Sep 15, 2026

@bmfmancini bmfmancini 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.

LGTM

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@TheWitness
TheWitness dismissed stale reviews from bmfmancini and xmacan via ef8d2d6 September 16, 2026 00:12
bmfmancini
bmfmancini previously approved these changes Sep 16, 2026
Replace plugin-ci-workflow.yml with plugin_evidence's version (renamed to intropage), adding a dedicated Run Pest Unit Tests step against Cacti's own Composer-managed vendor tree.

Replace tests/bootstrap.php with tests/bootstrap-unit.php, tests/TestCase.php and tests/.cacti-version copied from plugin_evidence, and update phpunit.xml accordingly. Remove the now-unused plugin-local composer.json since tests run via Cacti's vendor/bin/pest.
…pers

intropage_device_scope()/intropage_get_allowed_devices() call get_simple_device_perms(), get_allowed_devices(), read_user_setting(), set_user_setting() and cacti_count(), none of which were stubbed for the unit tests, causing 'Call to undefined function get_simple_device_perms()' once Pest actually ran in CI.
@TheWitness
TheWitness merged commit 62ec072 into develop Sep 16, 2026
0 of 3 checks passed
@TheWitness
TheWitness deleted the ci/check-log-for-issues branch September 16, 2026 00:49
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.

4 participants