Skip to content

Fix proxy-specs Scenario failures caused by missing JavaScript dist files#2191

Merged
einari merged 5 commits into
mainfrom
copilot/fix-specs-job-execution
May 4, 2026
Merged

Fix proxy-specs Scenario failures caused by missing JavaScript dist files#2191
einari merged 5 commits into
mainfrom
copilot/fix-specs-job-execution

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 3, 2026

The proxy-specs matrix jobs for Scenario namespaces (for_Queries, for_Commands, for_ObservableQueries) were failing because Arc/dist/cjs/index.js was not found. When the yarn cache is restored (hit from dotnet-build), yarn install skips prepare lifecycle scripts, so the JavaScript packages are never compiled into dist/.

Fixed

  • proxy-specs Scenario specs failing with JavaScript file not found: Arc/dist/cjs/index.js by running yarn build in the dotnet-build job and caching the compiled JS dist output (Source/JavaScript/**/dist) under a SHA-scoped key, then restoring that cache in each proxy-specs matrix job — mirroring the existing pattern used for the .NET bin cache

@einari
Copy link
Copy Markdown
Contributor

einari commented May 3, 2026

@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

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 3, 2026

@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 bi...

Done in a535129. yarn build now runs in dotnet-build and the compiled JS dist is saved to cache with key js-dist-${{ github.sha }}. Each proxy-specs matrix job restores from that cache — same pattern as the .NET bin cache — so no node/yarn setup is needed in the matrix jobs.

Copilot AI requested a review from einari May 3, 2026 16:40
Copilot finished work on behalf of einari May 3, 2026 16:40
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.16.1-pr2191.a535129

- 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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.17.0-pr2191.a5f6173

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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.17.0-pr2191.2154c3b

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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.17.0-pr2191.3ef411b

/// <inheritdoc/>
public async Task InitializeAsync()
{
_current = this;
/// <inheritdoc/>
public async Task DisposeAsync()
{
_current = null;
@einari einari marked this pull request as ready for review May 4, 2026 14:12
@einari einari merged commit 31f6732 into main May 4, 2026
50 checks passed
@einari einari deleted the copilot/fix-specs-job-execution branch May 4, 2026 14:13
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.

2 participants