Skip to content

Commit d0e779c

Browse files
committed
ci: add retry for artifact download steps
Transient failures in actions/download-artifact are a frequent source of flaky CI runs. Add a retry step after each download that triggers only when the first attempt fails (continue-on-error + outcome check). Applied to both functional-tests.yaml and upgrade-tests.yaml. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent 3d08ce4 commit d0e779c

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/functional-tests.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,19 @@ jobs:
7777
return true
7878
7979
- name: Download Git installer
80+
id: download-git
8081
if: steps.skip.outputs.result != 'true'
82+
continue-on-error: true
83+
uses: actions/download-artifact@v8
84+
with:
85+
name: ${{ inputs.git_artifact_name }}
86+
path: git
87+
repository: ${{ inputs.git_repository || github.repository }}
88+
run-id: ${{ inputs.git_run_id || github.run_id }}
89+
github-token: ${{ secrets.git_token || github.token }}
90+
91+
- name: Download Git installer (retry)
92+
if: steps.skip.outputs.result != 'true' && steps.download-git.outcome == 'failure'
8193
uses: actions/download-artifact@v8
8294
with:
8395
name: ${{ inputs.git_artifact_name }}
@@ -87,7 +99,19 @@ jobs:
8799
github-token: ${{ secrets.git_token || github.token }}
88100

89101
- name: Download GVFS installer
102+
id: download-gvfs
90103
if: steps.skip.outputs.result != 'true'
104+
continue-on-error: true
105+
uses: actions/download-artifact@v8
106+
with:
107+
name: GVFS_${{ matrix.configuration }}
108+
path: gvfs
109+
repository: ${{ inputs.vfs_repository || github.repository }}
110+
run-id: ${{ inputs.vfs_run_id || github.run_id }}
111+
github-token: ${{ secrets.vfs_token || github.token }}
112+
113+
- name: Download GVFS installer (retry)
114+
if: steps.skip.outputs.result != 'true' && steps.download-gvfs.outcome == 'failure'
91115
uses: actions/download-artifact@v8
92116
with:
93117
name: GVFS_${{ matrix.configuration }}
@@ -97,7 +121,19 @@ jobs:
97121
github-token: ${{ secrets.vfs_token || github.token }}
98122

99123
- name: Download functional tests drop
124+
id: download-ft
100125
if: steps.skip.outputs.result != 'true'
126+
continue-on-error: true
127+
uses: actions/download-artifact@v8
128+
with:
129+
name: FunctionalTests_${{ matrix.configuration }}
130+
path: ft
131+
repository: ${{ inputs.vfs_repository || github.repository }}
132+
run-id: ${{ inputs.vfs_run_id || github.run_id }}
133+
github-token: ${{ secrets.vfs_token || github.token }}
134+
135+
- name: Download functional tests drop (retry)
136+
if: steps.skip.outputs.result != 'true' && steps.download-ft.outcome == 'failure'
101137
uses: actions/download-artifact@v8
102138
with:
103139
name: FunctionalTests_${{ matrix.configuration }}

.github/workflows/upgrade-tests.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,32 @@ jobs:
6363
gh release download $tag --repo microsoft/VFSForGit --pattern "SetupGVFS*.exe" --dir gvfs-lkg
6464
6565
- name: Download Git installer
66+
id: download-git
6667
if: steps.skip.outputs.result != 'true'
68+
continue-on-error: true
69+
uses: actions/download-artifact@v8
70+
with:
71+
name: MicrosoftGit
72+
path: git
73+
74+
- name: Download Git installer (retry)
75+
if: steps.skip.outputs.result != 'true' && steps.download-git.outcome == 'failure'
6776
uses: actions/download-artifact@v8
6877
with:
6978
name: MicrosoftGit
7079
path: git
7180

7281
- name: Download current GVFS installer
82+
id: download-gvfs
7383
if: steps.skip.outputs.result != 'true'
84+
continue-on-error: true
85+
uses: actions/download-artifact@v8
86+
with:
87+
name: GVFS_${{ matrix.configuration }}
88+
path: gvfs-new
89+
90+
- name: Download current GVFS installer (retry)
91+
if: steps.skip.outputs.result != 'true' && steps.download-gvfs.outcome == 'failure'
7492
uses: actions/download-artifact@v8
7593
with:
7694
name: GVFS_${{ matrix.configuration }}

0 commit comments

Comments
 (0)