Skip to content

Commit 837746b

Browse files
[ci] Fail fast and retry transient failures on 'extract workload packs' (#11816)
When `extract workload packs` fails (e.g. a transient `dotnet workload install` network error), the step inherits `run-dotnet-preview.yaml`'s `continueOnError: true` default, so it's marked `succeededWithIssues` rather than failed. The job then boots the emulator and runs the entire device-test suite against a broken/rolled-back SDK, surfacing a pile of cascade "build failure" results (~19 in build 1486425) before finally failing at the very end. ## Changes `build-tools/automation/yaml-templates/setup-test-environment-steps.yaml` — the `extract workload packs` step now overrides the template defaults to treat workload-pack extraction as a hard prerequisite: ```yaml - template: /build-tools/automation/yaml-templates/run-dotnet-preview.yaml parameters: displayName: extract workload packs ... continueOnError: false # fail the job immediately instead of succeededWithIssues retryCountOnTaskFailure: 2 # retry transient network blips (e.g. Connection reset by peer) ``` - **Fail fast** — `continueOnError: false` stops the job at setup with a clear error instead of running a doomed emulator suite and failing at the end. - **Retry transient failures** — `retryCountOnTaskFailure: 2` retries one-off download errors before poisoning the run. This mirrors the adjacent `install OpenJDK and accept Android SDK licenses` step, which already sets `continueOnError: false`. Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
1 parent a1acf82 commit 837746b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

build-tools/automation/yaml-templates/setup-test-environment-steps.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ steps:
103103
xaSourcePath: ${{ parameters.xaSourcePath }}
104104
project: ${{ parameters.xaSourcePath }}/build-tools/create-packs/Microsoft.Android.Sdk.proj
105105
arguments: -t:ExtractWorkloadPacks -c ${{ parameters.configuration }} -v:n -bl:${{ parameters.xaSourcePath }}/bin/Test${{ parameters.configuration }}/extract-workloads.binlog
106+
continueOnError: false
107+
retryCountOnTaskFailure: 2
106108

107109
- ${{ if eq(parameters.installApkDiff, true) }}:
108110
- template: /build-tools/automation/yaml-templates/install-dotnet-tool.yaml

0 commit comments

Comments
 (0)