Repository navigation
build: retry Cache@2 steps on task failure - #343325
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
What changed in this PR
Improves build reliability by retrying Azure Pipelines Cache@2 tasks when transient cache-service failures occur (e.g., 429s), reducing job failures caused by temporary pipeline-cache errors.
Changes:
- Adds
retryCountOnTaskFailure: 2to allCache@2restore steps across product build pipelines. - Keeps existing cache-hit / fallback behavior unchanged while making cache restores more resilient.
| File | Description |
|---|---|
| build/azure-pipelines/win32/steps/product-build-win32-test.yml | Retries Cache@2 for WSL installer cache restore on task failure. |
| build/azure-pipelines/win32/steps/product-build-win32-setup.yml | Retries Cache@2 for node_modules cache restore on task failure. |
| build/azure-pipelines/win32/sdl-scan-win32.yml | Retries Cache@2 for API Scan node_modules cache restore on task failure. |
| build/azure-pipelines/win32/product-build-win32-node-modules.yml | Retries Cache@2 for node_modules cache restore inside job. |
| build/azure-pipelines/web/product-build-web.yml | Retries Cache@2 for web node_modules cache restore inside job. |
| build/azure-pipelines/web/product-build-web-node-modules.yml | Retries Cache@2 for web node-modules job cache restore. |
| build/azure-pipelines/product-quality-checks.yml | Retries Cache@2 for quality-checks node_modules cache restore. |
| build/azure-pipelines/linux/steps/product-build-linux-setup.yml | Retries Cache@2 for linux node_modules cache restore on task failure. |
| build/azure-pipelines/linux/product-build-linux-node-modules.yml | Retries Cache@2 for linux node-modules job cache restore. |
| build/azure-pipelines/darwin/steps/product-build-darwin-setup.yml | Retries Cache@2 for macOS node_modules cache restore on task failure. |
| build/azure-pipelines/darwin/product-build-darwin-node-modules.yml | Retries Cache@2 for macOS node-modules job cache restore. |
| build/azure-pipelines/copilot/setup-steps.yml | Retries Cache@2 for Copilot pipeline node_modules cache restore. |
| build/azure-pipelines/common/sanity-tests.yml | Retries Cache@2 for sanity tests node_modules cache restore. |
| build/azure-pipelines/common/install-builtin-extensions.yml | Retries Cache@2 for built-in extensions cache restore. |
| build/azure-pipelines/cli/cli-compile.yml | Retries Cache@2 for sccache restore on task failure. |
| build/azure-pipelines/alpine/product-build-alpine.yml | Retries Cache@2 for alpine node_modules cache restore. |
| build/azure-pipelines/alpine/product-build-alpine-node-modules.yml | Retries Cache@2 for alpine node-modules job cache restore. |
Review effort: Lite
|
Validation run 487746 (Product mode, publish off) finished.
|
66394bc to
6d7acfd
Compare
|
Base:
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
1 open issue
2 resolved since last review
Review effort: Lite
None of the 17 Cache@2 steps in the product build retried, so one transient pipeline-cache error failed the whole job even though every restore has a miss fallback. Over 90 days of main and release builds: - 8 builds failed on `Too Many Requests` (429) from the cache service, 2 of them in the post-job save - 487166 (official insider) lost Windows ARM64 Compile when the built-in extensions restore timed out after ~15 min of blob retries - 11 builds hit connection refused in a WSL cache restore that has since been removed (#342344) Add `retryCountOnTaskFailure: 2` to every Cache@2 step. A failure that survives both retries still fails the job: Cache@2 has no fail-open input, and `continueOnError` would turn the build partial. Co-authored-by: Copilot <[email protected]>
6d7acfd to
2e46e71
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
1 resolved since last review
Review effort: Lite
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
Dmitriy Vasyura (@dmitrivMS)Matched files:
|


Adds
retryCountOnTaskFailure: 2to all 17Cache@2steps in the product build (build/azure-pipelines/**). Today a single transient pipeline-cache error fails the whole job, even though every restore except sccache already falls back to installing or downloading on a cache miss (cacheHitVarplus a conditional step).Evidence (90 days, def 111, main and
release/*)About 25% of timelines couldn't be fetched, so treat these numbers as a floor.
Too Many Requests(429) from the pipeline cache serviceAttempt timed out after 00:01:00Restore built-in extensions cache, about 15 min:18080inRestore WSL kernel installer cacheDesign notes
Cache@2has no fail-open input; I checked the agent'sPipelineCacheplugin. The only way to fall through as a cache miss iscontinueOnError, which would turn routine cache hiccups into partially-succeeded builds. That's deliberately left out until there's data showing failures that survive both retries.retryCountOnTaskFailurealso applies to the post-job phase of a task isn't documented, so the validation run below is meant to answer that. I'll update this section with the result.Validation
t3i-cache-retry-validation). It exercises the node_modules, sccache, built-in extensions, sanity and quality-check caches on every platform. I'll report the result here.