Repository navigation
Run PR CI per affected sample, in parallel - #2298
Draft
David Pine (IEvangelist) wants to merge 6 commits into
Draft
David Pine (IEvangelist) wants to merge 6 commits into
David Pine (IEvangelist) wants to merge 6 commits into
Conversation
Plan the run from the PR diff (build/ci-plan.ps1) and validate each affected sample in its own Linux and Windows job, installing only the toolchains that sample needs. Documentation-only changes validate nothing; shared inputs validate every sample. Build.proj and the integration test project accept -p:SampleName to scope to one sample. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Skip AppHostRunsCleanly for AppHosts with endpoint tests; TestEndpointsReturnOk already starts, waits for and stops them. - Pre-pull each sample's container images from its committed manifests while it builds. - Use the runner's Docker instead of installing the latest version. - Validate Java only on Linux; Maven tests are platform-neutral. - Build a single sample's solution and file-based apps sequentially, since they share projects such as ServiceDefaults. - Resolve file-based AppHost dependencies from their own deps.json, instead of relying on other samples' AppHost projects. - Install .NET 10 only for samples with TypeScript AppHosts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retarget every project and file-based app to net11.0, and bump .NET-band packages (ASP.NET Core, EF Core, Npgsql EF, Microsoft.Extensions) to their 11.x releases. Microsoft.OpenApi moves to 3.x, which ASP.NET Core OpenApi 11 requires. Azure Functions moves to Azure.Functions.Sdk, because Microsoft.Azure.Functions.Worker.Sdk rejects net11.0. Also update READMEs and the devcontainer image. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist)
force-pushed
the
ievangelist-optimize-pr-ci
branch
from
December 6, 2026 01:27
d54683b to
56acf6c
Compare
The test host resolves file-based AppHost dependencies from the output directory, which for packages like Microsoft.Data.SqlClient is the platform-neutral stub. Preload the asset each AppHost's deps.json selects. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
Timings from actual runs on this branch, against a 23.9 min median for the last 15 green PR runs:
Most PRs here touch a single sample, so they land in the second or third row. Before this, the integration tests were 18.7 min of a single serial job. The slowest job now is about 3.5 min (Windows maildev-mailkit), and the whole run is bounded by that rather than by the sum of every sample. |
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.
PR CI used to run every sample serially in one Ubuntu job. The last 15 green PR runs had a median of 23.9 min (20.4 to 31.9), and the integration tests alone took about 18.7 min because every AppHost ran one after another.
This PR plans the run from the PR diff and gives each affected sample its own job. It also upgrades the samples to .NET 11.
CI
build/ci-plan.ps1maps changed paths to samples:tests/run every sample, Linux only.ci.yml,build/,samples/Directory.Build.props,nuget.config, unknown paths) run everything.samplesinput narrows a manual run.Linux (<sample>)job and aWindows (<sample>)job. Each installs only what that sample needs:Build.projandSamplesIntegrationTests.csprojtake-p:SampleName=<dir>. Without it they behave as before, so the internal pipeline is unchanged. Tests are scoped with a vstest filter on the AppHost name, plusAppHost/Categorytraits on facts that aren't parameterized by AppHost.AppHostRunsCleanlynow only covers AppHosts without endpoint tests.TestEndpointsReturnOkalready starts, waits for, and stops the same app, so every AppHost with endpoint tests was booting twice.CI Gateis still the single required check. It requiresplanto succeed and accepts skipped sample jobs.Issues that isolating samples exposed
AppHostAssemblyLoadernow loads the asset each AppHost's own deps.json selects..NET 11
Azure.Functions.Sdk, because the Worker SDK rejects net11.0. The two remainingnet10.0-windowsprojects were also retargeted.