Skip to content

ci: Investigate ENABLE_RUNNER_TRACING and TMT logger initialization #3

ci: Investigate ENABLE_RUNNER_TRACING and TMT logger initialization

ci: Investigate ENABLE_RUNNER_TRACING and TMT logger initialization #3

Workflow file for this run

name: Debug TMT
permissions:
actions: read
on:
push:
branches: [main]
workflow_dispatch: {}
env:
CARGO_TERM_COLOR: always
LIBVIRT_DEFAULT_URI: "qemu:///session"
jobs:
debug-tmt:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Bootc Ubuntu Setup
uses: ./.github/actions/bootc-ubuntu-setup
with:
libvirt: true
- name: Install tmt
run: pip install --user "tmt[provision-virtual]"
- name: Check environment and RUNNER_DEBUG
run: |
echo "=== Python version ==="
python3 --version
pip --version
echo "=== TMT version ==="
tmt --version
echo "=== Critical: Check RUNNER_DEBUG and ENABLE_RUNNER_TRACING ==="
echo "RUNNER_DEBUG=${RUNNER_DEBUG:-<not set>}"
echo "ENABLE_RUNNER_TRACING=${ENABLE_RUNNER_TRACING:-<not set>}"
echo "ACTIONS_STEP_DEBUG=${ACTIONS_STEP_DEBUG:-<not set>}"
echo "TMT_DEBUG=${TMT_DEBUG:-<not set>}"
echo "=== All environment variables (full list) ==="
env | sort
echo "=== Python logging configuration ==="
python3 -c "import logging; print(f'Root logger level: {logging.getLogger().level}')"
- name: Test TMT verbosity with different settings
run: |
echo "=== Test 1: tmt with default settings ==="
tmt --help 2>&1 | head -20
echo ""
echo "=== Test 2: Check if CI environment triggers debug mode ==="
python3 << 'EOF'
import os
print(f"CI={os.environ.get('CI', '<not set>')}")
print(f"GITHUB_ACTIONS={os.environ.get('GITHUB_ACTIONS', '<not set>')}")
print(f"RUNNER_DEBUG={os.environ.get('RUNNER_DEBUG', '<not set>')}")
print(f"ENABLE_RUNNER_TRACING={os.environ.get('ENABLE_RUNNER_TRACING', '<not set>')}")
print(f"ACTIONS_STEP_DEBUG={os.environ.get('ACTIONS_STEP_DEBUG', '<not set>')}")
EOF
echo ""
echo "=== Test 3: Check tmt logger initialization ==="
python3 << 'EOF'
import logging
import sys
sys.path.insert(0, '/home/runner/.local/lib/python3.13/site-packages')
# Check tmt logger before initialization
tmt_logger = logging.getLogger('tmt')
print(f"TMT logger level before import: {tmt_logger.level}")
print(f"TMT logger handlers: {tmt_logger.handlers}")
print(f"TMT logger effective level: {tmt_logger.getEffectiveLevel()}")
# Now import tmt and check again
import tmt.log
print(f"\nTMT logger level after import: {tmt_logger.level}")
print(f"TMT logger handlers: {tmt_logger.handlers}")
print(f"TMT logger effective level: {tmt_logger.getEffectiveLevel()}")
EOF