Skip to content

feat(dashboard): export received service resource snapshots - #5125

Closed
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:feat/beta-resource-snapshot-export-20260915
Closed

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:feat/beta-resource-snapshot-export-20260915

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Why this matters

The Dashboard already receives container CPU, memory and disk metrics, but operators cannot retain those values when reporting a resource problem. Add an Export resources JSON download to both Dashboard layouts using the existing received snapshot. No extra collection request or mutation is needed.

The invariant is that an export describes exactly the last successfully received resource inventory, including entries absent from the visible service page. It records browser receipt time separately from measurement time, preserves null/unknown values and CPU above 100%, and marks a failed refresh without discarding the previous receipt. An explicit field allowlist excludes unknown response fields and public URLs.

Overlap check

Searched open and closed upstream PRs for resource snapshot export and resources JSON download, plus changed-file indexes for Dashboard.jsx and CompactDashboard.jsx. Inspected #4027's CompactDashboard changes. #3062 addresses polling concurrency, #3270–#3273 add helper coverage, and #4027/#4207 concern layout work; none exports this resource receipt. #4891 exports a dependency graph, which has a different source and operator purpose. #5069 expands resource inventory membership and composes with this consumer.

Regression and validation

Candidate 8dfd450:

  • New public-page tests failed before implementation (three failures, three existing-behavior controls passed).
  • Focused Dashboard suites: 30 passed. Tests decode the actual download href in both layouts, assert all inventory entries and units, exclude unknown secret fields, and verify failure/recovery timestamps and data without an additional fetch.
  • Full Dashboard suite: 1,120 passed across 143 files. ESLint, production build, scoped secret/private-key/size hooks and diff checks passed.
  • Local make gate reaches the two existing root/WSL no-sudo fixture failures; this is not a full local gate pass.

Compatibility and limits

The exported schemaVersion 1 receipt includes its API source, receivedAt, refreshFailed, metrics, totals and the Docker Desktop memory caveat. The download appears only for a nonempty valid inventory. A failed refresh retains the previous receipt and shows an explicit message. Container and disk metrics may come from separate server caches; receipt time does not claim simultaneous measurement or freshness at the containers.

Rendering and download payloads were exercised through the real React page in jsdom on Linux/amd64. A native browser save dialog, native macOS/Windows and live hardware metrics were not exercised. No persistent application state or backend contract changes. Revert removes the UI download and receipt state. Batch integration should include #5069 before this consumer; shared polling/layout changes require their existing behavior to be retained during conflict resolution.

Hosted CI at the candidate SHA: 32 successful checks, four conditional skips, none failed or pending (2026-09-15). A synthetic first-26 batch merge passed the affected Dashboard/CompactDashboard suites. A separate pairwise integration with #3062 at 071ca93 required one catch/finally conflict resolution: retain the failed-refresh state update and the polling guard release. Both PRs' page regressions passed on union d84896e; no upstream branch was merged or rewritten.

Final combined receipt and review status

Ready for review at the 2026-09-15T08:28:06.7269998+00:00 snapshot; the candidate remains 8dfd45017825e03728d58a9a39d6e9d8e3f3a72e. GitHub: 32 successful checks, 4 conditional skips, none failed or pending.

The versioned 40-PR compatibility receipt records every candidate SHA, merge order, shared-file resolutions, pairwise comparisons and remaining gates. All 40 candidates are ancestors of tested integration a72e15781e4f41c3bd81f3b7f27f5b0fc5503a63: 2,997 API tests passed (3 skipped), 1,134 UI tests passed, 247 changed root contract tests passed (28 opt-in skips), and all four smoke paths passed. The full Makefile audit passed 84/87 suites; the three failures reproduce on the unchanged base. Simulation correction: the wrapper exits 0 but its artifact records 3/4 golden paths passed; Linux NVIDIA stops at the root-user guard, reproduced on the unchanged base. This supersedes any earlier simulation-pass wording. BATS and all-file private-key baseline failures are also documented, so a fully green local gate is not claimed.

The receipt supersedes provisional batch-validation wording above, while preserving the candidate-specific tests and their stated limitations. Integration results do not substitute for unexecuted native platform, hardware, browser, upgrade or host-agent lifecycle probes. Ready status permits review; independent human review and every declared live/operational gate still apply. No upstream merge or deployment has been performed.

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.

1 participant