Repository navigation
perf(dashboard): commit the frontend build and verify it in CI - #11664
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The fixture input manifest omits hidden files on Linux, causing the expected-success build to fail with ORLEANSDASHBOARD001 and blocking the Ubuntu Build job.
1 open issue
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
What changed in this PR
This PR moves Dashboard frontend generation out of ordinary .NET builds. Builds and packages instead verify and embed committed assets, while explicit generation and selective CI checks establish reproducibility.
Changes:
- Replace build-time npm/Vite execution with SDK-only source and output hash validation.
- Add pinned, canonical asset generation with bounded npm recovery and third-party notices.
- Add Windows/Linux reproduction selection and regression checks while preserving required .NET build gates.
| File | Description |
|---|---|
src/Dashboard/Orleans.Dashboard/Orleans.Dashboard.Frontend.targets |
Verify and embed committed assets; package notices. |
src/Dashboard/Orleans.Dashboard.App/verify-assets.cs |
Validate complete input/output inventories and hashes. |
src/Dashboard/Orleans.Dashboard.App/scripts/install.mjs |
Retry structured npm connection-reset failures. |
src/Dashboard/Orleans.Dashboard.App/README.md |
Document generation, verification, and development. |
src/Dashboard/Orleans.Dashboard.App/package.json |
Pin tooling and expose asset-management commands. |
src/Dashboard/Orleans.Dashboard.App/package-lock.json |
Record matching toolchain requirements. |
src/Dashboard/Orleans.Dashboard.App/generate-assets.mjs |
Generate canonical assets, manifests, and notices. |
src/Dashboard/Orleans.Dashboard.App/dist/index.html |
Commit the deployable HTML entry point. |
src/Dashboard/Orleans.Dashboard.App/assets.outputs.sha256 |
Record generated asset hashes. |
src/Dashboard/Orleans.Dashboard.App/assets.inputs.sha256 |
Record canonical frontend input hashes. |
src/Dashboard/Orleans.Dashboard.App/.node-version |
Pin the generation Node.js version. |
src/Dashboard/Orleans.Dashboard.App/.gitignore |
Allow committed frontend outputs. |
.github/workflows/ci.yml |
Integrate selective reproduction and regression checks. |
.github/scripts/test-summarize-coverage.ps1 |
Check the expanded coverage trust-input list. |
.github/scripts/test-dashboard-npm.mjs |
Exercise npm recovery and generation failures. |
.github/scripts/test-dashboard-frontend.ps1 |
Exercise SDK verification and asset preservation. |
.github/scripts/test-dashboard-frontend-selection.ps1 |
Test change selection and workflow routing. |
.github/scripts/select-dashboard-frontend-check.ps1 |
Select reproduction using immutable PR changes. |
.github/coverage-inputs.txt |
Include the selector in trusted coverage inputs. |
.gitattributes |
Normalize source line endings and preserve output bytes. |
Review effort: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the switch from build-time Dashboard frontend compilation to committed assets.
No open issues 🎉
1 resolved since last review
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the Dashboard frontend build and asset-verification changes.
No open issues 🎉
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the changes separating Dashboard frontend compilation from normal .NET builds.
No open issues 🎉
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change separating Dashboard frontend compilation from normal .NET builds.
No open issues 🎉
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change separating Dashboard frontend compilation from ordinary .NET builds.
No open issues 🎉
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced

Normal solution builds currently install the Dashboard npm tree and run Vite inside the multi-targeted .NET build. That external work delays Dashboard and downstream compilation even when the frontend is unchanged, and requires Node.js for every .NET build.
This commits the Dashboard production build under
src/Dashboard/Orleans.Dashboard.App/distand uses the standard committed-build-output pattern:dist/as a resource.Orleans.Dashboard.Frontend.targetsis now a static item include; .NET builds and packs need neither Node.js nor npm.npm run restoreandnpm run build, then commitdist/alongside the source change.Dashboardworkflow runs only when a pull request or push changessrc/Dashboard/Orleans.Dashboard.App/**(or the workflow itself), using GitHub'spathsfilter. ItsDashboard assetsjob runs the same two commands with the pinned Node.js version and fails ifgit statusshows any difference indist/; itsDashboard UI regressionsjob (moved fromci.yml) runs the Playwright tests. PRs that don't touch the Dashboard app never run npm, so unrelated changes such as new npm advisories or upstream nondeterminism cannot fail them.build.licenseoption (THIRD-PARTY-NOTICES.md), embedded in the assembly and included as a standalone file in the NuGet package. The Bootstrap, AdminLTE, and Font Awesome stylesheets are now imported fromindex.tsxrather than via CSS@import, so Vite's license collection sees them;index.cssandindex.min.jsare otherwise unchanged..gitattributes), and Node.js/npm are pinned via.node-versionandpackage.jsonengines/packageManager. The logo moved from a JavaScript import topublic/img/(same output path and bytes): Rolldown emitted a random asset reference ID for the imported image into the source map, making builds nondeterministic. Repeated fresh builds on Windows and Linux now reproduce the committeddist/byte-for-byte.npm run restoreretains the boundedECONNRESET-only clean-install retry from ci: Dashboard npm ci exits with code 152 in the Ubuntu BVT build #11548, with lockfile, authentication, integrity, lifecycle, and signal failures propagated immediately.Because .NET builds no longer run npm, the
BuildExternalAssetsproperty and its plumbing (run-testsaction input,Build-Samples.ps1 -SkipExternalAssets, docs commands) are removed, along with Node.js setup in the BVT, macOS, and analyzer-audit .NET jobs.Measurements
Measured against main
625b2baf761fa3cbfc35d1125c6b0d3244fdd847in an exclusive serial A–B–B–A window, using an earlier revision of this PR (a94dfef794) that additionally ran an SDK hash-verification task during the build:This is an observed 35.80 s / 25.0% median reduction from two samples per variant on a shared Windows host (same SDK, Debug, 32 MSBuild nodes, warm dependency stores, fresh project intermediates, restore included). Every sample performed the identical 294 C# and 8 F# compilation inventory; control performed one npm install/build, the candidate none. npm phase durations overlap compilation and are not additive savings. The current revision removes the verification task, so the .NET build does strictly less work than the measured candidate.
The repository tradeoff is ~25.6 MB of generated assets, most of it the existing 19.3 MB source map.
Relates to #11548 and #11636.
Microsoft Reviewers: Open in CodeFlow