land feat/pipeline-flamegraph (f87e951d75) #218

Merged
gitea_admin merged 2 commits from feat/pipeline-flamegraph into trunk 2026-07-04 23:09:07 +00:00
Contributor
No description provided.
Every build/release/deploy run row grows a "flame" profile chip that opens a
hand-rolled inline-SVG flamegraph: time-ordered Argo step lanes (scheduling gaps
visible) plus a duration-packed buildkit sub-step section parsed from the compile
log. This makes the class of stall we just chased — the docker.io "#2 load
metadata" 108s hang — obvious at a glance instead of needing a log crawl.

Data plane (wf-poller, deployment.yaml): a new trace tier projects each retained
run's .status.nodes timing into /shared/trace/<proj>/<wf>.json (names/types/
phases/timestamps ONLY — no log bytes, so publishing release runs is safe and the
release-log allowlist is untouched). A live tier refreshes incomplete runs every
cycle; a sweep tier (every 5th) rebuilds the full set bounded to newest 40/project
and two-rename swaps it in. Both stream kubectl->jq so the multi-MB list never
enters a shell var. nginx serves the index at /api/<proj>/trace and the per-run
JSON at /trace/<proj>/<wf>.json.

SPA (dashboard.html): a pure flame-core block (buildSpanTree by boundaryID —
Argo encodes sequential steps as a pod->StepGroup->pod chain, so a .children walk
would wrongly nest them; layoutLanes greedy lane-packing; parseBuildkitLog with
per-invocation #N-restart handling; renderFlameSVG) plus a flamebox lightbox mode
that reuses the logbox LIVET/LBGEN live-poll machinery. Clicking a frame opens
that step's existing log. CSP-clean (inline SVG, same-origin only).

tests/dashboard-trace.test.js extracts the shipped flame-core verbatim and
exercises it on real node shapes (boundaryID tree, lane stacking, buildkit
restart split, SVG escaping); release-render gains TRACEIDX + flame-chip
coverage.
A deploy run is a single Pod, so its four internal phases (dry-run gate ->
ff-main -> ArgoCD converge -> smoke) are only log markers, not Argo nodes. Append
@$(date +%s) to each numbered ::: marker so the dashboard flamegraph can parse
them into timed phase sub-spans under the deploy frame. Purely additive: the SPA
parser tolerates old (unstamped) logs and just shows a single bar.
gitea_admin deleted branch feat/pipeline-flamegraph 2026-07-04 23:09:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/pipelines!218
No description provided.