Repository navigation
Run CI test projects in parallel again with isolated concurrency tests - #4604
Merged
Merged
Conversation
Jobs no longer wait on `lint`, the lambda Docker builds skip PRs that do not touch their inputs, and `unit-test` runs test projects concurrently. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each PR saved its own ~1GB per-OS NuGet cache, pushing the repo past the 10GB cache limit and evicting the main caches PRs restore from. Windows PR runs then restored nothing and spent ~90s uploading a fresh cache. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The bootstrap action restores the NuGet cache into the workspace, but these workflows never set NUGET_PACKAGES, so NuGet ignored it and downloaded every package again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linux still runs the unit tests on every PR. The lambda change filter now also counts renamed-away inputs and the root .dockerignore. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`npm ci` takes about 6 minutes on Windows runners and sits on the critical path of the compile. A Linux job now builds `_static` with the Site project's own targets, and Windows and macOS reuse it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hanges Native npm packages such as esbuild, rolldown and lightningcss can break on one OS only. PRs that change package.json, the lockfile, the Vite or Tailwind config, or .nvmrc now build natively, and so do pushes to main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Linux leg already waits for the `frontend` job, which is itself a native Linux build, so building the frontend again there only added a minute of `npm ci`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`build` already waits for `frontend`, so reading the path filters from the `changes` job adds no wait and keeps every rule in one place. The `npm` job drops its Vite build, which `frontend` already covers, and `validate-assembler` builds `docs-builder` once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Compile step already builds everything, but `unit-test` recompiled before testing, costing 13-33s per OS. `--single-target` skips that dependency. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On 3-4 core runners, concurrent test projects starve the thread pool, and two concurrency tests in Elastic.Changelog.Tests time out on Windows and macOS. A new `--test-parallelism` flag sets how many projects run at once; CI uses 1, local runs keep the processor count. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…allel Two concurrency tests wait for background work with a fixed deadline. On busy 3-4 core runners, other tests blocking pool threads delayed that work past the deadline. Both now run alone, and the DecisionLog test uses dedicated threads, so CI can run test projects in parallel again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…log-concurrency-tests # Conflicts: # .github/workflows/ci.yml
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4604/ |
Mpdreamz
added a commit
that referenced
this pull request
Nov 11, 2026
Sequential projects take 22 seconds on this machine and four at a time take 7 to 8, and #4604 put CI back on the parallel run. `concurrentlyAtMost` replaces the hand-written process pool and keeps the per-project `::group::` output and the report of every failure. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 11, 2026
* Move the F# build to Nullean.Make.Fs and Proc.Fs shell blocks
Argu and Bullseye go away: one `Target` union now holds the targets, their help text and their dependencies, and each target body is a `shell { }` block. Test projects still run with buffered output through `concurrentlyAtMost`.
Command names are kebab-case now (`publish-containers`, `publish-zip`, `run-local-container`), and `--test-parallelism=4` is `--parallelism 4`. The callers in `ci.yml`, `release.yml`, `prerelease.yml` and the docs use the new names. `FSharp.Core` moves to 11.0.101 because Make.Fs needs it.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Reject an unknown --suite value before the build starts
Make.Fs hands the option over only after the Compile dependency has run, so a typo such as `--suite unti` used to build the whole solution before it failed. The entry point now checks the value first and exits with code 2, as Argu did.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Run test projects one after the other and type the test suite
TUnit already runs the tests of one project in parallel, so the buffered pool of projects goes, along with `--parallelism`. `--suite` is now a `TestSuite` enum instead of a string.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Check the --suite value against the TestSuite enum
The fast-fail check listed the values by hand; it now parses them as `TestSuite`, so the enum stays the only list.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Reject numeric and list values for --suite
Enum.TryParse accepts "7" and "unit,integration", so those slipped past the fail-fast check and ran every suite. The check now requires a declared name, and testProjects matches All explicitly and fails on any other value.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Drop the Fake packages from the build
The build used Fake for a version type, one `git` call, an environment lookup, a folder clean and a zip. Each is a few lines of `Proc.Fs` or the framework now, so `Fake.Tools.Git` and `Fake.IO.Zip` go.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Accept only declared names for --suite
`Enum.TryParse` takes `1` as `Unit` and passes `IsDefined`, so the number slipped through. The check compares with `Enum.GetNames` instead.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Run test projects concurrently again with --test-parallelism
Sequential projects take 22 seconds on this machine and four at a time take 7 to 8, and #4604 put CI back on the parallel run. `concurrentlyAtMost` replaces the hand-written process pool and keeps the per-project `::group::` output and the report of every failure.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* Run the tests as one dotnet test call over a generated solution filter
`dotnet test --solution` with the Microsoft.Testing.Platform runner runs the test modules in parallel and prints one summary, so the hand-written project loop goes. The filter is generated in `.artifacts/tests.slnf` from the same directory scan, so there is no file to keep in step with the solution.
`--parallelism` belongs to `test`, `unit-test` and `integrate` only, and CI ignores it and runs one module at a time.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
Two concurrency tests in
Elastic.Changelog.Testsnow run on their own, and one uses dedicated threads. With that, CI runs test projects in parallel again, which saves about 70s on Linux and 80s on Windows in theTeststep.Affects: Automation
Prompt summary: Make the changelog tests that timed out under parallel CI runs independent of the thread pool, so CI can run test projects in parallel again.
Why
When #4601 ran test projects in parallel, two tests failed on the Windows and macOS runners and passed on Linux. Both wait for background work with a fixed deadline, and that work needs a free thread-pool thread. On a 3-4 core runner, other tests in the same process block pool threads, and the background work starts too late. #4601 worked around this by running CI test projects one at a time.
What
The
DecisionLogdispose test no longer uses the thread poolDispose_AnotherThreadIsStillLogging_WaitsForItToFinishblocks a thread inside its logger on purpose. Its recording and disposing work now runs on dedicated threads (TaskCreationOptions.LongRunning), so a starved pool can't delay it. It also runs on its own, without other tests.The
WaitForDraintest runs on its ownIn
WaitForDrain_AfterStartAsync_WaitsForReaderEvenIfNotStartedYet, the product code starts the background reader on the thread pool. The reader must come up within the 2s deadline inWaitForDrain. The test now runs on its own ([NotInParallel]without a key), so no other test in the process can hold pool threads while it waits. The product code is unchanged.CI runs test projects in parallel again
The
Teststep drops--test-parallelism=1, so CI runs as many test projects at once as the runner has cores.Risk: I can't reproduce the original failures locally, even with every core saturated and a 3-core thread pool. Only repeated CI runs on Windows and macOS show whether this is enough. If they still fail, add
--test-parallelism=1back to theTeststep inci.yml.Verify
🤖 Generated with Claude Code