Repository navigation
Share cached observed dependency target materialization - #1986
Conversation
PR Summary by QodoShare cached materialization of observed dependency targets
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. Core-group links can hit wrong resources
|
âĶling (#2048) Topology's `uses` edges no longer mean only "autoscales". They also draw mounted claims and declared dependencies, such as Certificate â Issuer, Kustomization â its source, and Gateway â GatewayClass. Two places in the UI still read every `uses` edge as autoscaling: the graph legend, and the timeline's lane nesting. ## What changed **Timeline nesting.** The timeline made the target of every `uses` edge its source's parent lane. That's right for an autoscaler or a mounted claim, which sit under the workload they serve. For a dependency it files every dependent under one shared lane: every Certificate under its ClusterIssuer, and Gateways from different namespaces under one GatewayClass. Only HorizontalPodAutoscalers, VerticalPodAutoscalers, KEDA ScaledObjects and ScaledJobs, and PersistentVolumeClaims, matched on exact API group, now nest under their target. **Graph legend.** - Pink edges were labelled "scales"; they now read "uses". - Gray `manages` edges were labelled "owns", though they also draw GitOps inventory; they now read "manages". - Policy and disruption-budget (`protects`) edges had no color of their own and rendered in that same gray. They're now violet, with their own legend entry. ## Testing - A timeline test with an HPA â Deployment edge and a Certificate â Issuer edge. The autoscaler nests, the dependency doesn't. It fails with the old rule. - Topology component tests, `make tsc`, and the shared UI and web suites pass. ## Notes The open dependency PRs (#1979, #1986, #1989, #1993) add `uses` edges from dependents to their dependencies. This PR makes the legend and timeline correct for them, so it should land before or with them.
5a684b7 to
3958943
Compare
0975de5 to
5b8ad1e
Compare
|
/review |
|
Code review by qodo was updated up to the latest commit 5b8ad1e |
Share cached exact-identity target enrollment so controller dependency joins reuse observed nodes without per-reference API reads.
5b8ad1e to
f1e10bd
Compare
A refactor with no behavior change: certificate â issuer links are identical before and after. It moves cached observed-dependency materialization into one shared helper, so the identity, scope and deduplication rules have one implementation. The KEDA (#1987) and Flux (#1989) dependency PRs are built on it; it exists so those two don't carry separate copies of the same logic.
Controller-specific parsers supply exact source/target references and retain their own defaults and valid-kind rules. The common helper groups target reads by group/kind, lists each kind once, reuses existing node identities and adds only observed referenced targets. Missing sources or targets and repeated passes cannot fabricate or duplicate relationships. Exact cluster authorization metadata stays attached to materialized nodes.
Validation: the complete Go, type-check and frontend matrix passes at the final head. Fresh live REST/MCP checks preserve both issuer dependency directions and the Issuer's metadata owner. Unit cases cover lookup fanout, missing/reused targets, scope/group collisions, absent sources and repeated-pass deduplication. Visual testing is skipped because this backend refactor changes no rendered surface.
No new endpoint, renderer or mandatory provider interface is added. Cached reads are distinct from startup discovery and informer traffic.