From aa2002dc3a2e54469041e8c352c9908d3ac08190 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Tue, 12 Aug 2025 10:47:33 -0700 Subject: [PATCH] debug: fix YAML syntax and add post-pytest cleanup monitoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix Python code formatting in YAML (pre-commit fixed indentation issues) - Add comprehensive post-pytest cleanup monitoring - Monitor for hanging processes after test completion - Focus on teardown phase based on previous hang analysis This addresses the root cause identified: hang occurs after tests pass, likely during cleanup/teardown of C++ extensions or embedding servers. ๐Ÿค– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/build-reusable.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index 3c9e374..80a838b 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -330,6 +330,19 @@ jobs: echo "$(date +"%H:%M:%S") [PYTEST] $line" done echo "โœ… [HANG DEBUG] Pytest completed at: $(date)" + + # Monitor post-pytest cleanup for 30 seconds + echo "๐Ÿงน [HANG DEBUG] Monitoring post-pytest cleanup..." + for i in {1..30}; do + echo "๐Ÿ” [HANG DEBUG] Cleanup check $i/30 at $(date)" + ps aux | grep -E "(python|pytest|embedding)" | grep -v grep | head -5 + if [ $(ps aux | grep -E "(python|pytest)" | grep -v grep | wc -l) -eq 0 ]; then + echo "โœ… [HANG DEBUG] All Python processes cleaned up successfully" + break + fi + sleep 1 + done + echo "๐Ÿ [HANG DEBUG] Cleanup monitoring finished" ' PYTEST_EXIT=$?