Skip to content

Commit b9cc239

Browse files
committed
Fix main-push-fast workflow module detection and prevent recursive triggers
- Fix bash parsing logic that incorrectly extracted debug output instead of actual module list - Separate stdout (module result) from stderr (debug logging) in test discovery - Add .github/workflows/** to paths-ignore to prevent workflow from triggering on its own changes - Workflow now properly handles infrastructure-only changes with empty module list Signed-off-by: [email protected]
1 parent de5cd35 commit b9cc239

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/main-push-fast.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- 'spring-ai-docs/**'
88
- '*.md'
99
- 'docs/**'
10+
- '.github/workflows/**'
1011

1112
jobs:
1213
fast-impacted:
@@ -84,20 +85,19 @@ jobs:
8485
8586
echo "=== Running test_discovery.py for main branch ==="
8687
set -x # Enable bash debug mode
87-
MODS=$(python3 .github/scripts/test_discovery.py modules-from-diff --verbose 2>&1)
88+
# Capture stdout (the actual result) and stderr (verbose logging) separately
89+
MODULE_LIST=$(python3 .github/scripts/test_discovery.py modules-from-diff --verbose 2>/tmp/discovery_debug.log)
8890
EXIT_CODE=$?
8991
set +x # Disable bash debug mode
9092
9193
echo ""
9294
echo "=== Test Discovery Results ==="
9395
echo "Exit code: $EXIT_CODE"
94-
echo "Output:"
95-
echo "$MODS"
96+
echo "Debug output:"
97+
cat /tmp/discovery_debug.log
9698
echo ""
99+
echo "Module list result: '$MODULE_LIST'"
97100
98-
# Extract just the module list (last line that isn't stderr logging)
99-
MODULE_LIST=$(echo "$MODS" | grep -v "^Detected base ref:" | grep -v "^Changed files" | grep -v "^Final module list:" | tail -1)
100-
echo "Extracted modules: '$MODULE_LIST'"
101101
echo "modules=$MODULE_LIST" >> "$GITHUB_OUTPUT"
102102
103103
- name: Test affected modules with integration tests

0 commit comments

Comments
 (0)