Skip to content

Commit 07a2558

Browse files
dhusebyDave Grantham
andauthored
fix test selection (#776)
Signed-off-by: Dave Grantham <dwg@linuxprogrammer.org> Co-authored-by: Dave Grantham <dwg@linuxprogrammer.org>
1 parent b38d7ab commit 07a2558

File tree

16 files changed

+682
-209
lines changed

16 files changed

+682
-209
lines changed

.github/actions/detect-changed-impls/action.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Detect Changed Implementations"
2-
description: "Detect which implementations/relays/routers have changed in images.yaml or impls/ folder during a PR"
2+
description: "Detect which implementations/relays/routers have changed in images.yaml or images/ folder during a PR"
33

44
inputs:
55
test-type:
@@ -29,9 +29,9 @@ outputs:
2929
impls-yaml-changed:
3030
description: "Boolean indicating if images.yaml file changed"
3131
value: ${{ steps.detect.outputs.impls-yaml-changed }}
32-
impls-folder-changed:
33-
description: "Boolean indicating if impls/ folder changed"
34-
value: ${{ steps.detect.outputs.impls-folder-changed }}
32+
images-folder-changed:
33+
description: "Boolean indicating if images/ folder changed"
34+
value: ${{ steps.detect.outputs.images-folder-changed }}
3535

3636
runs:
3737
using: "composite"
@@ -48,13 +48,13 @@ runs:
4848
# Set paths based on test type
4949
if [ "$TEST_TYPE" = "transport" ]; then
5050
IMPLS_FILE="transport/images.yaml"
51-
IMPLS_DIR="transport/impls"
51+
IMAGES_DIR="transport/images"
5252
elif [ "$TEST_TYPE" = "hole-punch" ]; then
5353
IMPLS_FILE="hole-punch/images.yaml"
54-
IMPLS_DIR="hole-punch/impls"
54+
IMAGES_DIR="hole-punch/images"
5555
elif [ "$TEST_TYPE" = "perf" ]; then
5656
IMPLS_FILE="perf/images.yaml"
57-
IMPLS_DIR="perf/impls"
57+
IMAGES_DIR="perf/images"
5858
else
5959
echo "Error: Invalid test-type. Must be 'transport', 'hole-punch', or 'perf'"
6060
exit 1
@@ -71,7 +71,7 @@ runs:
7171
CHANGED_ROUTERS=""
7272
CHANGED_BASELINES=""
7373
IMPLS_YAML_CHANGED="false"
74-
IMPLS_FOLDER_CHANGED="false"
74+
IMAGES_FOLDER_CHANGED="false"
7575
7676
# =================================================================
7777
# PART 1: Check if images.yaml itself changed
@@ -171,13 +171,13 @@ runs:
171171
fi
172172
173173
# =================================================================
174-
# PART 2: Check if files in impls/ subfolder changed
174+
# PART 2: Check if files in images/ subfolder changed
175175
# =================================================================
176-
IMPLS_FOLDER_FILES=$(echo "$CHANGED_FILES" | grep "^$IMPLS_DIR/" || echo "")
176+
IMAGES_FOLDER_FILES=$(echo "$CHANGED_FILES" | grep "^$IMAGES_DIR/" || echo "")
177177
178-
if [ -n "$IMPLS_FOLDER_FILES" ]; then
179-
echo "→ Files in $IMPLS_DIR/ changed - matching to local components"
180-
IMPLS_FOLDER_CHANGED="true"
178+
if [ -n "$IMAGES_FOLDER_FILES" ]; then
179+
echo "→ Files in $IMAGES_DIR/ changed - matching to local components"
180+
IMAGES_FOLDER_CHANGED="true"
181181
182182
# Process each changed file
183183
while IFS= read -r changed_file; do
@@ -274,7 +274,7 @@ runs:
274274
fi
275275
done
276276
fi
277-
done <<< "$IMPLS_FOLDER_FILES"
277+
done <<< "$IMAGES_FOLDER_FILES"
278278
fi
279279
280280
# Output all results
@@ -283,7 +283,7 @@ runs:
283283
echo "changed-routers=$CHANGED_ROUTERS" >> $GITHUB_OUTPUT
284284
echo "changed-baselines=$CHANGED_BASELINES" >> $GITHUB_OUTPUT
285285
echo "impls-yaml-changed=$IMPLS_YAML_CHANGED" >> $GITHUB_OUTPUT
286-
echo "impls-folder-changed=$IMPLS_FOLDER_CHANGED" >> $GITHUB_OUTPUT
286+
echo "images-folder-changed=$IMAGES_FOLDER_CHANGED" >> $GITHUB_OUTPUT
287287
288288
# Set has-changes
289289
if [ -n "$CHANGED_IMPLS" ] || [ -n "$CHANGED_RELAYS" ] || [ -n "$CHANGED_ROUTERS" ] || [ -n "$CHANGED_BASELINES" ]; then

.github/workflows/daily-full-interop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ jobs:
324324
test-select: '${{ needs.resolve-transport-parameters.outputs.test-select }}'
325325
test-ignore: '${{ needs.resolve-transport-parameters.outputs.test-ignore }}'
326326
cache-dir: /srv/cache
327-
snapshot: false
327+
snapshot: true
328328
force-matrix-rebuild: ${{ needs.resolve-transport-parameters.outputs.force-matrix-rebuild }}
329329
force-image-rebuild: ${{ needs.resolve-transport-parameters.outputs.force-image-rebuild }}
330330
debug: ${{ needs.resolve-transport-parameters.outputs.debug }}
@@ -348,7 +348,7 @@ jobs:
348348
router-select: '${{ needs.resolve-hole-punch-parameters.outputs.router-select }}'
349349
router-ignore: '${{ needs.resolve-hole-punch-parameters.outputs.router-ignore }}'
350350
cache-dir: /srv/cache
351-
snapshot: false
351+
snapshot: true
352352
force-matrix-rebuild: ${{ needs.resolve-hole-punch-parameters.outputs.force-matrix-rebuild }}
353353
force-image-rebuild: ${{ needs.resolve-hole-punch-parameters.outputs.force-image-rebuild }}
354354
debug: ${{ needs.resolve-hole-punch-parameters.outputs.debug }}
@@ -371,7 +371,7 @@ jobs:
371371
baseline-ignore: '${{ needs.resolve-perf-parameters.outputs.baseline-ignore }}'
372372
iterations: '${{ needs.resolve-perf-parameters.outputs.iterations }}'
373373
cache-dir: /srv/cache
374-
snapshot: false
374+
snapshot: true
375375
force-matrix-rebuild: ${{ needs.resolve-perf-parameters.outputs.force-matrix-rebuild }}
376376
force-image-rebuild: ${{ needs.resolve-perf-parameters.outputs.force-image-rebuild }}
377377
debug: ${{ needs.resolve-perf-parameters.outputs.debug }}

.github/workflows/hole-punch-interop-pr.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ on:
5757
snapshot:
5858
description: 'Create and upload test snapshot for debugging'
5959
required: false
60-
default: false
60+
default: true
6161
type: boolean
6262

6363
concurrency:
@@ -115,38 +115,41 @@ jobs:
115115
echo "test-select=${{ steps.detect.outputs.changed-impls }}" >> $GITHUB_OUTPUT
116116
117117
# Negate each implementation ID in the pipe-separated list
118+
# Always include ~failing to skip known-broken tests
118119
CHANGED_IMPLS="${{ steps.detect.outputs.changed-impls }}"
119120
if [ -n "$CHANGED_IMPLS" ]; then
120121
NEGATED_IMPLS=$(echo "$CHANGED_IMPLS" | sed 's/|/|!/g;s/^/!/')
121-
echo "test-ignore=$NEGATED_IMPLS" >> $GITHUB_OUTPUT
122+
echo "test-ignore=~failing|$NEGATED_IMPLS" >> $GITHUB_OUTPUT
122123
else
123-
echo "test-ignore=" >> $GITHUB_OUTPUT
124+
echo "test-ignore=~failing" >> $GITHUB_OUTPUT
124125
fi
125126
126127
echo "relay-select=${{ steps.detect.outputs.changed-relays }}" >> $GITHUB_OUTPUT
127128
128129
# Negate each relay ID in the pipe-separated list
130+
# Always include ~failing to skip known-broken relays
129131
CHANGED_RELAYS="${{ steps.detect.outputs.changed-relays }}"
130132
if [ -n "$CHANGED_RELAYS" ]; then
131133
NEGATED_RELAYS=$(echo "$CHANGED_RELAYS" | sed 's/|/|!/g;s/^/!/')
132-
echo "relay-ignore=$NEGATED_RELAYS" >> $GITHUB_OUTPUT
134+
echo "relay-ignore=~failing|$NEGATED_RELAYS" >> $GITHUB_OUTPUT
133135
else
134-
echo "relay-ignore=" >> $GITHUB_OUTPUT
136+
echo "relay-ignore=~failing" >> $GITHUB_OUTPUT
135137
fi
136138
137139
echo "router-select=${{ steps.detect.outputs.changed-routers }}" >> $GITHUB_OUTPUT
138140
139141
# Negate each router ID in the pipe-separated list
142+
# Always include ~failing to skip known-broken routers
140143
CHANGED_ROUTERS="${{ steps.detect.outputs.changed-routers }}"
141144
if [ -n "$CHANGED_ROUTERS" ]; then
142145
NEGATED_ROUTERS=$(echo "$CHANGED_ROUTERS" | sed 's/|/|!/g;s/^/!/')
143-
echo "router-ignore=$NEGATED_ROUTERS" >> $GITHUB_OUTPUT
146+
echo "router-ignore=~failing|$NEGATED_ROUTERS" >> $GITHUB_OUTPUT
144147
else
145-
echo "router-ignore=" >> $GITHUB_OUTPUT
148+
echo "router-ignore=~failing" >> $GITHUB_OUTPUT
146149
fi
147150
148151
echo "force-matrix-rebuild=${{ steps.detect.outputs.impls-yaml-changed }}" >> $GITHUB_OUTPUT
149-
echo "force-image-rebuild=${{ steps.detect.outputs.impls-folder-changed }}" >> $GITHUB_OUTPUT
152+
echo "force-image-rebuild=${{ steps.detect.outputs.images-folder-changed }}" >> $GITHUB_OUTPUT
150153
echo "debug=false" >> $GITHUB_OUTPUT
151154
echo "snapshot=true" >> $GITHUB_OUTPUT
152155
echo "should-run-tests=${{ steps.detect.outputs.has-changes }}" >> $GITHUB_OUTPUT

.github/workflows/perf-pr.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ on:
5252
snapshot:
5353
description: 'Create and upload test snapshot for debugging'
5454
required: false
55-
default: false
55+
default: true
5656
type: boolean
5757

5858
concurrency:
@@ -108,30 +108,32 @@ jobs:
108108
echo "test-select=${{ steps.detect.outputs.changed-impls }}" >> $GITHUB_OUTPUT
109109
110110
# Negate each implementation ID in the pipe-separated list
111+
# Always include ~failing to skip known-broken tests
111112
CHANGED_IMPLS="${{ steps.detect.outputs.changed-impls }}"
112113
if [ -n "$CHANGED_IMPLS" ]; then
113114
NEGATED_IMPLS=$(echo "$CHANGED_IMPLS" | sed 's/|/|!/g;s/^/!/')
114-
echo "test-ignore=$NEGATED_IMPLS" >> $GITHUB_OUTPUT
115+
echo "test-ignore=~failing|$NEGATED_IMPLS" >> $GITHUB_OUTPUT
115116
else
116-
echo "test-ignore=" >> $GITHUB_OUTPUT
117+
echo "test-ignore=~failing" >> $GITHUB_OUTPUT
117118
fi
118119
119120
echo "baseline-select=${{ steps.detect.outputs.changed-baselines }}" >> $GITHUB_OUTPUT
120121
121122
# Negate each baseline ID in the pipe-separated list
123+
# Always include ~failing to skip known-broken baselines
122124
CHANGED_BASELINES="${{ steps.detect.outputs.changed-baselines }}"
123125
if [ -n "$CHANGED_BASELINES" ]; then
124126
NEGATED_BASELINES=$(echo "$CHANGED_BASELINES" | sed 's/|/|!/g;s/^/!/')
125-
echo "baseline-ignore=$NEGATED_BASELINES" >> $GITHUB_OUTPUT
127+
echo "baseline-ignore=~failing|$NEGATED_BASELINES" >> $GITHUB_OUTPUT
126128
else
127-
echo "baseline-ignore=" >> $GITHUB_OUTPUT
129+
echo "baseline-ignore=~failing" >> $GITHUB_OUTPUT
128130
fi
129131
130132
echo "iterations=10" >> $GITHUB_OUTPUT
131133
echo "force-matrix-rebuild=${{ steps.detect.outputs.impls-yaml-changed }}" >> $GITHUB_OUTPUT
132134
# Force image rebuild if images.yaml changed (commit SHA changes require new images)
133-
# or if impls folder changed (local implementation files changed)
134-
if [ "${{ steps.detect.outputs.impls-yaml-changed }}" = "true" ] || [ "${{ steps.detect.outputs.impls-folder-changed }}" = "true" ]; then
135+
# or if images folder changed (local implementation files changed)
136+
if [ "${{ steps.detect.outputs.impls-yaml-changed }}" = "true" ] || [ "${{ steps.detect.outputs.images-folder-changed }}" = "true" ]; then
135137
echo "force-image-rebuild=true" >> $GITHUB_OUTPUT
136138
else
137139
echo "force-image-rebuild=false" >> $GITHUB_OUTPUT

.github/workflows/transport-interop-pr.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737
snapshot:
3838
description: 'Create and upload test snapshot for debugging'
3939
required: false
40-
default: false
40+
default: true
4141
type: boolean
4242

4343
concurrency:
@@ -87,18 +87,19 @@ jobs:
8787
echo "test-select=${{ steps.detect.outputs.changed-impls }}" >> $GITHUB_OUTPUT
8888
8989
# Negate each implementation ID in the pipe-separated list
90+
# Always include ~failing to skip known-broken tests
9091
CHANGED_IMPLS="${{ steps.detect.outputs.changed-impls }}"
9192
if [ -n "$CHANGED_IMPLS" ]; then
9293
NEGATED_IMPLS=$(echo "$CHANGED_IMPLS" | sed 's/|/|!/g;s/^/!/')
93-
echo "test-ignore=$NEGATED_IMPLS" >> $GITHUB_OUTPUT
94+
echo "test-ignore=~failing|$NEGATED_IMPLS" >> $GITHUB_OUTPUT
9495
else
95-
echo "test-ignore=" >> $GITHUB_OUTPUT
96+
echo "test-ignore=~failing" >> $GITHUB_OUTPUT
9697
fi
9798
9899
echo "force-matrix-rebuild=${{ steps.detect.outputs.impls-yaml-changed }}" >> $GITHUB_OUTPUT
99100
# Force image rebuild if images.yaml changed (commit SHA changes require new images)
100-
# or if impls folder changed (local implementation files changed)
101-
if [ "${{ steps.detect.outputs.impls-yaml-changed }}" = "true" ] || [ "${{ steps.detect.outputs.impls-folder-changed }}" = "true" ]; then
101+
# or if images folder changed (local implementation files changed)
102+
if [ "${{ steps.detect.outputs.impls-yaml-changed }}" = "true" ] || [ "${{ steps.detect.outputs.images-folder-changed }}" = "true" ]; then
102103
echo "force-image-rebuild=true" >> $GITHUB_OUTPUT
103104
else
104105
echo "force-image-rebuild=false" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)