Repository navigation
perf(dashboard): separate dependency and frontend build invalidation - #11636
Open
ReubenBond wants to merge 5 commits into
Open
ReubenBond wants to merge 5 commits into
ReubenBond wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Node shim breaks Ubuntu CI before regression tests and builds run, while the installation fingerprint omits install-strategy, allowing stale dependency layouts to persist.
2 open issues
What changed in this PR
This PR separates dependency installation from frontend compilation in the Orleans Dashboard build, allowing source edits and Rebuild to reuse installed npm dependencies.
Changes:
- Adds separate installation and compilation stamps, with content-based invalidation and generated-asset tracking.
- Adds 15 regression scenarios and runs them in Windows and Linux CI.
- Updates documentation for asset embedding and Clean/Rebuild behavior.
| File | Description |
|---|---|
src/Dashboard/Orleans.Dashboard/Orleans.Dashboard.Frontend.targets |
Separates installation and build invalidation and tracks generated assets. |
src/Dashboard/Orleans.Dashboard.App/README.md |
Documents output paths, dependency reuse, and rebuild behavior. |
.github/workflows/ci.yml |
Adds the frontend incrementality regression step. |
.github/scripts/test-dashboard-frontend.ps1 |
Tests invalidation, failure recovery, asset ownership, and cleaning. |
Review effort: Balanced
(cherry picked from commit 6440755)
Retry only npm structured ECONNRESET failures after the native request retry layer has finished. Preserve selected npm, configured feeds/cache, real ci and lifecycle execution, failure debug logs, actual signals, and frontend build gating. Make the installer exit code authoritative so recovered debug traces do not become MSBuild errors. (cherry picked from commit c73dad75d756bd303a9d915e6c19079a65a4c5d1)
ReubenBond
force-pushed
the
rb-dashboard-build-incrementality
branch
from
October 31, 2026 16:46
63279ee to
dcd9c99
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The fixture exercises Clean;Build rather than framework Rebuild targets, leaving Clean/Rebuild ordering and stamp lifetime unvalidated when those targets clean shared frontend state in a real multi-target SDK project.
No open issues 🎉
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Problem
Dashboard frontend source edits and Rebuild run
npm citogether with Vite compilation, repeating dependency installation even when the dependency tree is current.Solution
Track installation independently using a success stamp inside
node_modules, keyed to dependency manifest, installer script, and npm configuration contents, Node.js/npm versions, and effective dependency-tree options, includinginstall-strategy. Clean retains this installation state.Track frontend source paths and contents separately, together with the complete generated asset inventory. Source edits, deletions, renames, changed build configuration, and missing assets refresh the frontend bundle. Installation and compilation invalidate their success stamps before fallible work. Framework builds continue to share the outer project's frontend owner and embed every generated asset.
Real project builds demonstrate zero
npm ciinvocations for source-only edits and Rebuild, with one frontend compilation each; unchanged builds run neither operation. The regression script covers 17 incrementality, ownership, failure-recovery, and clean scenarios, configured for Windows and Linux CI. Local validation also exercises multiple Node applications on PATH and an effective installation-strategy change through the process environment. Both packaged target-framework assemblies retain byte-identical copies of all frontend assets, including fonts, images, and source maps.Installation now runs through
npm run restore, using the selected npm CLI and its configured registry/cache. The wrapper makes up to three clean-install attempts for structured npmECONNRESETfailures, including interrupted response bodies, and preserves npm debug logs and actual child-signal diagnostics. Other failures retain their exit status. Nine real-npm regression cases exercise recovery, bounded exhaustion, lifecycle execution, deterministic failures, and the composed MSBuild stamp boundary.Discovery cost
Each outer build, including an otherwise unchanged build, executes
node --version,npm --version, and a scopednpm config getonce. These three serialized discovery commands keep tool and npm configuration invalidation current across all target frameworks. The prior up-to-date frontend target executed zero discovery commands, so this change adds discovery overhead to that path while eliminating repeated installation on source edits and Rebuild.The existing two-framework no-op binlog for the initial implementation (
d4edfede9b) records exactly three discoveryExectasks, all in the outer project: 0.259 s for Node identity, 2.326 s for npm identity, and 4.148 s for npm configuration, totaling 6.734 s.PrepareNpmAppInstallexecuted once and took 6.958 s. These are elapsed observations from one shared-machine sample, including contention and subprocess launch costs, rather than a steady-state overhead estimate or an unchanged-build speedup claim.Microsoft Reviewers: Open in CodeFlow