Repository navigation
Clean scheduled benchmark job work directories - #2214
Conversation
Replace unkeyed noClean retention with reuseBuild in scheduled and shared benchmark configurations while preserving fresh per-run containers and database volumes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Container-matrix variants can reuse the shared image tag incorrectly and stop refreshing nightly inputs.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Replaces unbounded noClean usage with keyed build reuse to prevent scheduled benchmark agents from exhausting disk space.
Changes:
- Enables
options.reuseBuildfor affected application and database jobs. - Removes redundant framework pipeline
--application.noCleanoverrides. - Preserves fresh containers while retaining build artifacts.
| File | Description |
|---|---|
src/BenchmarksApps/TechEmpower/RazorPages/razorpages.benchmarks.yml |
Reuses the PostgreSQL build. |
src/BenchmarksApps/TechEmpower/Minimal/minimal.benchmarks.yml |
Reuses the PostgreSQL build. |
src/BenchmarksApps/TechEmpower/BlazorSSR/blazorssr.benchmarks.yml |
Reuses the PostgreSQL build. |
scenarios/te.benchmarks.yml |
Enables reuse across TechEmpower jobs. |
scenarios/platform.benchmarks.yml |
Reuses the PostgreSQL build. |
scenarios/orchard.benchmarks.yml |
Reuses the PostgreSQL build. |
scenarios/goldilocks.benchmarks.yml |
Reuses the PostgreSQL build. |
scenarios/database.benchmarks.yml |
Reuses PostgreSQL and SQL Server builds. |
scenarios/containers.benchmarks.yml |
Enables container-matrix application reuse. |
build/frameworks-scenarios.yml |
Removes the application noClean override. |
build/frameworks-database-scenarios.yml |
Removes the application noClean override. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Keep container-matrix application builds fresh because variants share an image tag, and restore the TechEmpower scenario file's original whitespace and EOF layout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Can we get some runs with these new configs, and make sure we are not moving the needle on these scenarios? |
DrewScoggins
left a comment
There was a problem hiding this comment.
Looks good other than my comment.
|
Follow-up on the request for validation runs: Functional/cache validation: passedI ran A/B smoke coverage on the Azure ARM64 relay pod using immutable Benchmarks/TFB refs and a pinned toolchain:
All valid runs completed with zero bad responses/request errors. The tests verified cold keyed builds, true warm build skips for both application and DB images, correct image/tag selection, and successful missing-image recovery after deploying the draft fix from dotnet/crank#902 at Crank dependency
Performance screening: not statistically resolvedThe precommitted 30-second pairs produced mixed results:
Short cold/warm samples were mixed from neutral to better, while the interleaved old-first long pairs were sensitive to ordering/environment and sometimes triggered the missing-image fallback rebuild. This is not enough evidence to call either a regression or an improvement. Next stepRun balanced, randomized 5x5 measured pairs on a reserved pod at normal duration before drawing a precision performance conclusion. |
Remove the PR-added reuseBuild settings so scheduled jobs continue cloning and building normally while their per-run work directories are cleaned. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Design update: based on the source/image freshness concerns raised during validation, this PR has been narrowed to only remove The PR no longer adds The earlier reuseBuild cache and performance test results were useful for identifying behavior, but they no longer apply to the final design of this PR. The final diff and validation now cover cleanup-only behavior. |
|
what needs to be checked is how long the databased jobs take to be ready (only these jobs). We might have to download the image between each run without that. |
|
Copilot Investigated/Written: Good point. I checked the Crank cleanup flow and ran database-only comparisons both locally and on the production Linux Azure ARM64 DB agent.
Both paths still remove the named job image and the database container/anonymous volumes. Docker's For the production test I ran three
All six runs completed successfully. Every run performed the expected The median submit-to-ready difference was only 0.162 seconds, and build/start times were not worse with cleanup. The meaningful difference was retention: the three This matches the local Docker/Crank test, where warm PostgreSQL builds were 7.535 seconds with Based on both environments, removing /Not AI: I will also watch to make sure this doesn't add any instability to the test runs over the next few days👍. |

Summary
Scheduled Docker benchmark jobs used
noClean: true, which retained a new unkeyed work directory for every run and could exhaust agent disk space.This change removes
noCleanfrom the scheduled/shared application and database job definitions reached bybenchmarks-ci-azure,benchmarks-ci-01, andbenchmarks-ci-02. It also removes the redundant framework-template--application.noClean trueoverrides.Jobs continue cloning and building normally, then use Crank's standard per-run cleanup. No source/build/image reuse behavior is introduced, so sources and Docker images continue to refresh through their existing build paths. Generated CI entrypoints were not edited.
Validation
noCleanremovalgit diff --check