Skip to content

fix(kubernetes): render the Helm release resource graph - #5880

Merged
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:fix/helm-graph-render
Sep 3, 2026
Merged

fix(kubernetes): render the Helm release resource graph#5880
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:fix/helm-graph-render

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Found while live-verifying #5878 (ngx-graph 11 to 13) on the dev stack.

The Helm release resource graph (Workloads, a release, Overview) never left
"Loading resources", on develop before the bump as well as after it. The
component is OnPush under zoneless change detection and wrote nodes and
links into plain fields from its combineLatest(...).subscribe(...), so
nothing ever marked the view dirty. ng.getComponent showed ten nodes on the
instance while the DOM had no <ngx-graph>. It only painted when something
unrelated happened to mark the view (an | async emission, a click), which is
why it looked intermittent rather than dead. Broken since the zoneless
migration (27ef38c852, 2025-10-31).

Changes:

  • nodes, links and layout are signals; the template reads them.
  • The initial fit ran on a 10ms timer that fired before the first layout
    existed and clipped the right-hand nodes. It now fits on ngx-graph's
    drawComplete output, added in 12 for this purpose.
  • chore(deps): bump @swimlane/ngx-graph from 11.0.0 to 13.0.0 #5878 switched the import from the deprecated NgxGraphModule to the
    standalone GraphComponent, as ngx-graph 12's deprecation notice says to.
    That component injects a LayoutService declared without providedIn,
    which only the module provided, so the first render threw NG0201. The
    build and the create-only spec were both green. The component now provides
    it itself.
  • The spec pushes a graph through HelmReleaseDataService, the same service
    the release socket writes, and asserts the element appears. It stubs
    ngx-graph (the real one throws NG0203 under happy-dom). Checked both
    ways: red on plain fields, green on signals.
  • Adds the indirect fast-uri bump (chore(deps): bump fast-uri from 3.1.5 to 3.1.7 in /src/frontend/packages/devkit #5879) to the Chores fragment.

Verified live against the k3d test cluster's traefik release: the graph
renders within a few seconds of load, the first paint is fitted, Fit works,
node drag is disabled while background pan still works (the enableDrag
rename), and clicking a Deployment node opens a populated preview panel.
make check gate green.

Two things seen along the way that are not in this PR: the dev proxy's
changeOrigin makes the backend refuse every WebSocket upgrade with 403
unless it is started with ALLOWED_ORIGINS=https://localhost:5540; and the
backend polls cluster-scoped release resources (ClusterRole,
ClusterRoleBinding, IngressClass) at a namespaced path and gets 404, so those
nodes open an empty preview panel.

The graph page stayed on "Loading resources" after the socket had
delivered nodes and links. The component is OnPush under zoneless change
detection and wrote them into plain fields from its subscription, so the
view was never marked dirty. nodes, links and layout are signals now.

Two more things stood between the data and the screen once it rendered:
the initial fit ran on a 10ms timer before the first layout existed and
clipped the right-hand nodes, so it now fits on ngx-graph's drawComplete;
and the standalone GraphComponent that ngx-graph 12 points consumers to
injects a LayoutService that only its deprecated module provided, so the
component provides it itself.

The spec stubs ngx-graph and pushes a graph through the data service the
socket writes to, asserting the element appears. It fails on plain fields.
@norman-abramovitz
norman-abramovitz merged commit 7425b3f into cloudfoundry:develop Sep 3, 2026
24 checks passed
@nabramovitz
nabramovitz deleted the fix/helm-graph-render branch September 3, 2026 06:21
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.

2 participants