Skip to content

Commit 93bd1a9

Browse files
committed
ci: Fix YAML syntax error in debug-tmt.yml
Move Python verification code to separate script file to avoid YAML syntax issues with multiline strings and quotes. Assisted-by: Claude Code (Sonnet 4.5)
1 parent 261a201 commit 93bd1a9

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env python3
2+
"""Verify that TMT has the DebugLevelFilter patch applied."""
3+
4+
import sys
5+
sys.path.insert(0, "/home/runner/.local/lib/python3.13/site-packages")
6+
7+
import tmt.log
8+
import inspect
9+
10+
# Check if the patch is applied by looking at DebugLevelFilter
11+
source = inspect.getsource(tmt.log.DebugLevelFilter.filter)
12+
if "return False" in source and "Filter out DEBUG messages" in source:
13+
print("✓ PATCH CONFIRMED: DebugLevelFilter has the fix applied")
14+
sys.exit(0)
15+
else:
16+
print("✗ WARNING: Patch may not be applied correctly")
17+
print("Source code:")
18+
print(source)
19+
sys.exit(1)

.github/workflows/debug-tmt.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,7 @@ jobs:
4040
tmt --version
4141
4242
echo "=== Verify we have the patched version ==="
43-
python3 << 'EOF'
44-
import sys
45-
sys.path.insert(0, '/home/runner/.local/lib/python3.13/site-packages')
46-
import tmt.log
47-
import inspect
48-
49-
# Check if the patch is applied by looking at DebugLevelFilter
50-
source = inspect.getsource(tmt.log.DebugLevelFilter.filter)
51-
if 'return False' in source and 'Filter out DEBUG messages' in source:
52-
print("✓ PATCH CONFIRMED: DebugLevelFilter has the fix applied")
53-
else:
54-
print("✗ WARNING: Patch may not be applied correctly")
55-
print("Source code:")
56-
print(source)
57-
EOF
43+
python3 .github/scripts/verify-tmt-patch.py
5844
5945
echo ""
6046
echo "=== Critical: Check RUNNER_DEBUG, ENABLE_RUNNER_TRACING, and CI ==="

0 commit comments

Comments
 (0)