Skip to content

Commit 261a201

Browse files
committed
ci: Test TMT patch from cgwalters/tmt fork
Update debug-tmt.yml to install TMT from cgwalters/tmt's fix-queue-debug-logging branch instead of PyPI. This tests the patch that fixes DebugLevelFilter to reject DEBUG messages without TMT's custom details attribute. Changes: - Install tmt from git+https://github.com/cgwalters/tmt.git@fix-queue-debug-logging - Add verification step to confirm the patch is applied - Update debug-tmt.sh to count and report DEBUG lines - Add success/failure reporting for the fix Expected result: 0 DEBUG:tmt.* lines in output (vs 100k+ without patch) Assisted-by: Claude Code (Sonnet 4.5)
1 parent 432019a commit 261a201

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

.github/scripts/debug-tmt.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,21 @@ echo "=== Test 1: TMT run discover only (no provision) ==="
2020
tmt run discover --how fmf 2>&1 | head -50 || true
2121

2222
echo ""
23-
echo "=== Test 1b: TMT run with provision (minimal, local) ==="
24-
tmt run -v provision --how local 2>&1 | head -100 || true
23+
echo "=== Test 1b: TMT run with provision (local) - Check for DEBUG lines ==="
24+
tmt_output=$(tmt run -v provision --how local 2>&1 || true)
25+
echo "$tmt_output" | head -100
26+
27+
echo ""
28+
echo "=== Analysis: Count DEBUG lines (should be 0 with patch) ==="
29+
debug_count=$(echo "$tmt_output" | grep -c "^DEBUG:tmt\." || true)
30+
echo "DEBUG:tmt.* lines found: $debug_count"
31+
if [ "$debug_count" -eq 0 ]; then
32+
echo "✓ SUCCESS: No unwanted DEBUG lines in output!"
33+
else
34+
echo "✗ FAILURE: Found $debug_count DEBUG lines (patch may not be working)"
35+
echo "Sample DEBUG lines:"
36+
echo "$tmt_output" | grep "^DEBUG:tmt\." | head -10
37+
fi
2538

2639
echo ""
2740
echo "=== Test 2: Check if TMT detects it's in CI and enables debug ==="

.github/workflows/debug-tmt.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,47 @@ jobs:
2424
with:
2525
libvirt: true
2626

27-
- name: Install tmt
28-
run: pip install --user "tmt[provision-virtual]"
27+
- name: Install tmt from cgwalters/tmt fork with fix
28+
run: |
29+
# Install tmt from cgwalters/tmt fork's fix-queue-debug-logging branch
30+
# This tests the patch that filters out DEBUG messages without TMT details
31+
pip install --user "git+https://github.com/cgwalters/tmt.git@fix-queue-debug-logging#egg=tmt[provision-virtual]"
2932
3033
- name: Check environment and RUNNER_DEBUG
3134
run: |
3235
echo "=== Python version ==="
3336
python3 --version
3437
pip --version
3538
36-
echo "=== TMT version ==="
39+
echo "=== TMT version and git commit ==="
3740
tmt --version
3841
42+
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
58+
59+
echo ""
3960
echo "=== Critical: Check RUNNER_DEBUG, ENABLE_RUNNER_TRACING, and CI ==="
4061
echo "RUNNER_DEBUG=${RUNNER_DEBUG:-<not set>}"
4162
echo "ENABLE_RUNNER_TRACING=${ENABLE_RUNNER_TRACING:-<not set>}"
4263
echo "ACTIONS_STEP_DEBUG=${ACTIONS_STEP_DEBUG:-<not set>}"
4364
echo "TMT_DEBUG=${TMT_DEBUG:-<not set>}"
4465
echo "CI=${CI:-<not set>}"
4566

46-
echo "=== All environment variables (full list) ==="
47-
env | sort
48-
67+
echo ""
4968
echo "=== Python logging configuration ==="
5069
python3 -c "import logging; print(f'Root logger level: {logging.getLogger().level}')"
5170

0 commit comments

Comments
 (0)