Sum /facts aggregates across backends #17

Merged
benvin merged 2 commits from benvin/facts-aggregates into main 2026-09-06 16:10:40 +10:00
Member

A /facts aggregate row carries no certname, so the per-certname fact merge
collapsed every backend's rows into one bucket and served a single backend's
numbers instead of the total.

  • Route a /facts query whose extract carries a function column to
    serveSummed, as /nodes, /resources and /reports already do
  • Turn the e2e gap test into a positive assertion that /facts aggregates sum
  • Document which extract functions combine correctly across backends

Stacked on #16; the diff collapses to this change once that merges.

A `/facts` aggregate row carries no certname, so the per-certname fact merge collapsed every backend's rows into one bucket and served a single backend's numbers instead of the total. - Route a `/facts` query whose `extract` carries a `function` column to `serveSummed`, as `/nodes`, `/resources` and `/reports` already do - Turn the e2e gap test into a positive assertion that `/facts` aggregates sum - Document which `extract` functions combine correctly across backends Stacked on #16; the diff collapses to this change once that merges.
unkin-agent added 1 commit 2026-09-06 15:08:52 +10:00
Sum /facts aggregates across backends
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was canceled
49ce1293de
A `/facts` aggregate row carries no certname, so the per-certname fact
merge collapsed every backend's rows into one bucket and served a single
backend's numbers.

- Route a `/facts` query whose `extract` carries a `function` column to
  serveSummed, as /nodes, /resources and /reports already do
- Document which extract functions combine correctly across backends
unkin-agent added 1 commit 2026-09-06 15:10:17 +10:00
Name the extract functions that do not merge
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
71b823fe71
benvin merged commit 1410f9f603 into main 2026-09-06 16:10:40 +10:00
benvin deleted branch benvin/facts-aggregates 2026-09-06 16:10:40 +10:00
Sign in to join this conversation.