Skip to content

fix(graph): correct graph subsystem bugs#7186

Draft
somethingwithproof wants to merge 6 commits into
Cacti:developfrom
somethingwithproof:feat/graph-subsystem-correctness
Draft

fix(graph): correct graph subsystem bugs#7186
somethingwithproof wants to merge 6 commits into
Cacti:developfrom
somethingwithproof:feat/graph-subsystem-correctness

Conversation

@somethingwithproof

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the authenticated user when proxying graph image renders to a remote collector.
  • Reject remote graph responses that do not contain the expected image marker before serving bytes as PNG data.
  • Restore the remote collector temporary error handler with finally so failed collector calls do not leak handlers.
  • Key the GPRINT consolidation-function cache by data source and template RRD id.
  • Use returned realtime graph bytes when RRDtool succeeds but the realtime cache file is unavailable.
  • Add a Docker-backed graph subsystem regression probe.

Open PR overlap

Validation

  • php -l graph_image.php
  • php -l graph_realtime.php
  • php -l lib/functions.php
  • php -l lib/rrd.php
  • php -l tests/e2e/graph_subsystem_probe.php
  • bash -n tests/e2e/graph_subsystem_docker.sh
  • bash tests/e2e/graph_subsystem_docker.sh

The Docker probe passes. It emits existing PHP deprecation notices from Cacti/vendor code under the container PHP version before printing PASS graph subsystem docker probe.

@somethingwithproof somethingwithproof changed the title [codex] Fix graph subsystem correctness bugs fix(graph): correct graph subsystem bugs Jun 14, 2026
@somethingwithproof somethingwithproof force-pushed the feat/graph-subsystem-correctness branch from aed1717 to cca04e0 Compare June 14, 2026 17:53
php-cs-fixer flagged array() in graph_realtime.php; convert to [] for the
coding-standards gate.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
phpstan 2.2.2 added a stricter is_numeric() always-true inference that
fails on pre-existing develop code (lib/data_query.php); pin until that
is addressed upstream so CI is reproducible.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Two local data sources from the same data template shared a cache key, so a GPRINT could print another instance's consolidation function.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof somethingwithproof force-pushed the feat/graph-subsystem-correctness branch from cca04e0 to b1e21a0 Compare June 14, 2026 20:43
Clears the level 6 alreadyNarrowedType error on lib/data_query.php:2591 that
develop currently emits, matching the sibling narrowing identifiers already ignored.

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.

1 participant