Resolve the per-certname routes to the node's owning backend #25

Merged
benvin merged 1 commits from benvin/merge-per-node-fact-routes into main 2026-09-12 20:33:22 +10:00
Member

The /pdb/query/v4 paths keyed on a single certname took the unmerged pass-through, so a node both backends hold answered from whichever backend is configured first, while /facts answered from whichever holds its newer report — the same node, two different answers.

  • add a route claiming /pdb/query/v4/{nodes,factsets,catalogs}/<certname> and every path under it
  • order that route's backends by the freshness map the /facts merge already attributes records with
  • try the remaining backends after the owner, and replay upstream's own 404 body when none holds the certname
The `/pdb/query/v4` paths keyed on a single certname took the unmerged pass-through, so a node both backends hold answered from whichever backend is configured first, while `/facts` answered from whichever holds its newer report — the same node, two different answers. - add a route claiming `/pdb/query/v4/{nodes,factsets,catalogs}/<certname>` and every path under it - order that route's backends by the freshness map the `/facts` merge already attributes records with - try the remaining backends after the owner, and replay upstream's own 404 body when none holds the certname
unkin-agent added 1 commit 2026-09-12 17:58:58 +10:00
Resolve the per-certname routes to the node's owning backend
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
eeb44057db
The paths keyed on one certname took the pass-through, so a node both
backends hold answered from whichever was configured first while /facts
answered from whichever held its newer report.

- add a route claiming /pdb/query/v4/{nodes,factsets,catalogs}/<certname>
- order the backends for it by the freshness map the /facts merge uses
- try the remaining backends after the owner, replaying upstream's 404 when none holds the certname
- assert ownership, the upstream 404 body, a failed backend and query forwarding against captured openvoxdb shapes
benvin merged commit 5207a79ad4 into main 2026-09-12 20:33:22 +10:00
benvin deleted branch benvin/merge-per-node-fact-routes 2026-09-12 20:33:23 +10:00
Sign in to join this conversation.