Skip to content

Fix multi-tree graph exports - #97

Merged
TheWitness merged 2 commits into
developfrom
fix/tree-export-host-selection
Nov 11, 2026
Merged

TheWitness merged 2 commits into
developfrom
fix/tree-export-host-selection

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Summary

  • Bind each selected tree ID separately when collecting hosts for a tree export.
  • Add single-tree, multi-tree, and export selection regression coverage.
  • Record the fix in the changelog.

Fixes #96

Validation

  • Pest: 69 tests, 204 assertions passed.
  • PHP syntax checks, manifest validation, PHP CS Fixer check for the new test, and diff checks passed.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Graph and header tree items have host_id 0, so the tree host list
produced gl.host_id IN(0, ...) and exported every allowed non-device
graph, including graphs on no selected tree. Restrict the lookup to
host_id > 0.

GROUP_CONCAT() truncates at group_concat_max_len (1024 bytes by
default), which a multi-tree selection reaches sooner and which can
leave a partial id that matches another host. Fetch the ids as rows and
join them in PHP instead.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof
somethingwithproof force-pushed the fix/tree-export-host-selection branch from 4fae8e5 to f4ba1e1 Compare November 9, 2026 01:42
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit 9e55c5e into develop Nov 11, 2026
7 checks passed
@TheWitness
TheWitness deleted the fix/tree-export-host-selection branch November 11, 2026 23:01
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.

Include hosts from every selected tree in tree exports

2 participants