Skip to content

Commit 4cf2b16

Browse files
authored
Merge branch 'main' into dev-pohanh-vllm-v0.11.2
2 parents 7da989d + 30534f2 commit 4cf2b16

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/label-validation.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ jobs:
8383
8484
validate:
8585
needs: get-jobs
86-
if: ${{ needs.get-jobs.outputs.search-space-config != '[]' }}
86+
if: ${{ always() && needs.get-jobs.result == 'success' && needs.get-jobs.outputs.search-space-config != '[]' }}
8787
uses: ./.github/workflows/benchmark-tmpl.yml
8888
strategy:
8989
fail-fast: false
9090
matrix:
91-
config: ${{ fromJson(needs.get-jobs.outputs.search-space-config) }}
91+
# The '|| '[]'' fallback is required because GitHub evaluates the matrix expression
92+
# before the 'if' condition. Without it, fromJson() throws a parse error when the
93+
# output is empty/undefined (e.g., when get-jobs is pending approval or was skipped).
94+
config: ${{ fromJson(needs.get-jobs.outputs.search-space-config || '[]') }}
9295
secrets: inherit
9396
name: validate ${{ matrix.config.runner }}
9497
with:
@@ -107,14 +110,14 @@ jobs:
107110
conc: ${{ matrix.config.conc }}
108111

109112
collect-results:
110-
needs: validate
111-
if: ${{ always() }}
113+
needs: [get-jobs, validate]
114+
if: ${{ always() && needs.get-jobs.result == 'success' }}
112115
uses: ./.github/workflows/collect-results.yml
113116
secrets: inherit
114117

115118
calc-success-rate:
116-
needs: collect-results
117-
if: ${{ always() }}
119+
needs: [get-jobs, collect-results]
120+
if: ${{ always() && needs.get-jobs.result == 'success' }}
118121
runs-on: ubuntu-latest
119122

120123
env:

0 commit comments

Comments
 (0)