Fix proxy-specs Scenario failures caused by missing JavaScript dist files#2191
Conversation
Agent-Logs-Url: https://github.com/Cratis/Arc/sessions/b0fc54f1-ce5b-432c-86bc-a63cae0364d4 Co-authored-by: einari <134365+einari@users.noreply.github.com>
|
@copilot The step you added for generating the JavaScript should be done prior to entering the proxy specs matrix and just leverage caching to get it across to every job, as we do with the compiled binaries for .net |
…atrix Agent-Logs-Url: https://github.com/Cratis/Arc/sessions/2d954705-6a72-443b-8ebd-1afb2249c381 Co-authored-by: einari <134365+einari@users.noreply.github.com>
Done in a535129. |
|
NuGet packages for this PR, e.g. Cratis.Arc: |
- Remove redundant explicit 'yarn build' step; dotnet build triggers BuildJavaScriptPackages internally for ProxyGenerator.Specs, which runs 'yarn build' in Arc and Arc.React - Add 'Restore node modules' cache step to proxy-specs so JavaScriptRuntime can find node_modules (typescript compiler, reflect-metadata, fundamentals) without running a full yarn install on each matrix job - Add dotnet-build.yml path to PR trigger so workflow changes self-test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
NuGet packages for this PR, e.g. Cratis.Arc: |
The single 'specs' job ran all 12 spec projects sequentially, taking ~17 minutes. Mirror the same pattern used for proxy-specs: discover spec project directories in dotnet-build and fan them out into a fail-fast:false matrix so each project runs in parallel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
NuGet packages for this PR, e.g. Cratis.Arc: |
ProxyGenerator.Specs: Add SharedScenarioWebHostFixture that starts a single Kestrel web host once per collection instead of once per test class. Declare it as ICollectionFixture on ScenarioCollectionDefinition so xUnit shares it across all 50+ test classes in for_Queries, for_Commands, and for_ObservableQueries. Saves ~300-600ms × test-class count per namespace run. ObservableControllerQueriesState.Reset() is called in each Establish() to maintain test isolation with the shared host. EntityFrameworkCore.SqlServer.Specs: Add AssemblyInfo.cs to disable test parallelization (matching EntityFrameworkCore.PostgreSql.Specs). Remove the custom sqlcmd health check from SqlServerFixture and rely on the Testcontainers.MsSql default wait strategy, saving ~30-60s of container startup overhead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
NuGet packages for this PR, e.g. Cratis.Arc: |
| /// <inheritdoc/> | ||
| public async Task InitializeAsync() | ||
| { | ||
| _current = this; |
| /// <inheritdoc/> | ||
| public async Task DisposeAsync() | ||
| { | ||
| _current = null; |
The
proxy-specsmatrix jobs for Scenario namespaces (for_Queries,for_Commands,for_ObservableQueries) were failing becauseArc/dist/cjs/index.jswas not found. When the yarn cache is restored (hit fromdotnet-build),yarn installskipspreparelifecycle scripts, so the JavaScript packages are never compiled intodist/.Fixed
proxy-specsScenario specs failing withJavaScript file not found: Arc/dist/cjs/index.jsby runningyarn buildin thedotnet-buildjob and caching the compiled JS dist output (Source/JavaScript/**/dist) under a SHA-scoped key, then restoring that cache in eachproxy-specsmatrix job — mirroring the existing pattern used for the .NET bin cache