Repository navigation
Preserve autoscaling target identity and link HPA Object metric sources - #2009
Conversation
PR Summary by QodoPreserve autoscaling target identity and link HPA Object metric sources
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. Incomplete object metrics crash the drawer
|
|
Qodo finding (incomplete Object metric crashes the drawer): not changing this. The HPA API server rejects an Object metric source without |
Regarding finding 1, your API-validation point is valid for objects accepted by the current HPA API server: a persisted The finding is still defensive rather than evidence of a valid Kubernetes object. The renderer receives raw drawer data, which can also originate from cached objects, older API versions, mocks, or malformed data. A small guard would prevent the entire HPA drawer from crashing if such data reaches the UI, but I agree this is lower priority and may be out of scope if the application guarantees server-validated inputs. No change is required if that input guarantee is intentional; otherwise, the minimal fix is to safely handle a missing nested |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
b0da042 to
9373bf5
Compare
86e716b to
24cc14f
Compare
âĶference links (#1996) EndpointSlice, Knative and Crossplane references can name a custom resource whose Kind collides with a core resource. Preserve the declared API group and discovered scope so clicking a reference opens the intended object rather than a same-named object in another API. ## Changes - Resolve EndpointSlice targets with their own namespace and discovered scope. Keep controller-written Pod references without apiVersion navigable, and make nodeName a core Node link. - Resolve group-qualified plurals before group-blind Kind aliases, while protecting canonical core plurals against discovery collisions. - Use one Knative reference reader and link component for versioned and group-only declarations. Incomplete custom identities remain visible text. - Use the same group-qualified plural for Crossplane composed-resource status fetches and navigation. ## Validation Go build, pkg and internal tests, TypeScript checks and the complete shared UI suite pass (4,534 tests, one existing skip). Full frontend/embed/backend build passes. Web tests passed except one existing timer under concurrent load; all seven tests in that file passed on an isolated rerun. Compared main and this change against the EKS nonprod and management test clusters using owned fixtures, REST, read-only MCP calls and headless Chromium. EndpointSlice and Knative links open the custom object rather than the core decoy. Crossplane custom Node status uses its discovered workerhosts plural and succeeds; its custom Endpoints alias already resolves on main and remains correct. Controller-shaped Pod and core Node clicks remain functional. Browser runs recorded no page errors. The Knative fixture was not Ready, and Crossplane fixtures were manually created composite/managed-resource shapes; the evidence establishes identity and navigation, not successful controller reconciliation. Group-only Knative references are component-tested because the installed PingSource schema rejects that experimental field.   ## Notes #2009 builds on this reference converter. The overlapping #2047 should follow this stack and retain these shared Knative helpers, collision protections and tests alongside its additional brokerRef changes. No endpoint or authorization behavior changes.
24cc14f to
62f2950
Compare
Keep resource navigation faithful to the declared API identity so colliding Kinds cannot route operators to a different object.
Keep resource navigation faithful to the declared API identity so colliding Kinds cannot route operators to a different object.
Keep resource navigation faithful to the declared API identity so colliding Kinds cannot route operators to a different object.
Keep resource navigation faithful to the declared API identity so colliding Kinds cannot route operators to a different object.
âĶd detection KEDA reads an omitted apiVersion as apps/v1, so `kind: Rollout` without a version names an apps Rollout, not the same-named Argo Rollout. Topology joined it to the Argo Rollout. Topology and missing-target detection now share one reader with KEDA's defaults, matching the detail view.
The ScaledObject pass ran before the StatefulSet pass, so a ScaledObject scaling a StatefulSet never got its edge: the StatefulSet showed no autoscaler and MCP scaledBy was empty.
Current relationship projection distinguishes autoscaling from other uses edges by API group. Exercise both directions for a StatefulSet target and require the omitted-version Rollout to remain unlinked so the delayed target pass cannot silently regress these surfaces.
Core Namespace Object metrics use the HPA namespace even when apiVersion is omitted. Standard VPA workload Kinds use built-in selectors without consulting apiVersion, so keep omitted-version links usable and distinguish a declared custom target from the built-in selector target when they differ.
VPA selects built-in workload Pods by Kind before consulting apiVersion, so topology and related-resource projections must follow the same selector policy as the drawer. Refuse unqualified non-standard targets rather than attaching them to an unrelated API group. Object metric observations must match their declared API group and selector. Normalize Namespace metrics to the HPA namespace and put each source link in its existing metric card, keeping references and reported values together.
Match HPA observations by structured object and selector identity while retaining readable metric labels. Show KEDA defaults in the drawer and compact context, and share VPA target contract cases between the backend and renderer tests.
Retain HPA Object metric source links and exact source/value pairing, and KEDA's documented defaults and delayed StatefulSet target edges. Remove the custom-group VPA Pod-selector override, dual-target drawer, exported policy helper and shared mismatch contract. The supplied clusters and upstream usage evidence do not establish that configuration as a user workflow. Keep a single declared target and versionless built-in links, reusing the existing built-in metadata instead of a controller policy table. Remove the bespoke bare-Rollout advice; the effective Target API suffices. Replace the intentionally removed mismatch contract tests with ordinary VPA navigation/projection coverage. Exercise the documented Ingress Object source at the renderer callback seam and assert a single target link.
The test passed a state the HPA diagnosis type does not define, which fails the shared UI type-check.
79d1e3f to
048ab7c
Compare
Document exact target groups, KEDA defaults and HPA metric status meanings. Remove drawer details and unsupported controller-policy claims from MCP docs.
An HPA can scale a Deployment using an Object metric from an Ingress, but Radar's metric card currently gives no route to that source. KEDA ScaledObjects targeting StatefulSets also lose their topology edge because targets are resolved before StatefulSet nodes exist.
Design
No endpoint, read privilege or custom scale-subresource graph support is added. Merge after #1996, which supplies exact-reference navigation.
Testing
TypeScript, the complete Go pkg suite, both focused topology regressions and all 19 autoscaler renderer tests pass. Component regressions exercise an Ingress Object source, exact declared groups and versionless VPA links; builder regressions exercise KEDA StatefulSet edges and both relationship projections. The documented KEDA setup fails against main and passes with this change in a synthetic builder experiment.
Merge verification remains blocked: full frontend runs reported failures in unchanged tests under severe host contention, including the known kind-view flake, which also failed in isolation. Root Go build/internal tests, full application build and lint did not complete; rerun those checks before merging. Assertions and timeouts were not weakened.
The supplied clusters have ten Resource CPU HPAs and no KEDA or VPA CRDs. Historical live HPA fixtures validated API admission and source navigation. No custom-metrics adapter or KEDA controller reconciled them; source links do not establish working metrics or successful scaling.