debug: preserve stderr in CI to debug embedding server startup failures
Previous fix revealed the real issue: embedding server fails to start within 120s, not timeout issues. The error was hidden because both stdout and stderr were redirected to DEVNULL in CI. Changes: - Keep stderr output in CI environment for debugging - Only redirect stdout to DEVNULL to avoid buffer deadlock - This will help us see why embedding server startup is failing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -304,13 +304,15 @@ class EmbeddingServerManager:
|
|||||||
project_root = Path(__file__).parent.parent.parent.parent.parent
|
project_root = Path(__file__).parent.parent.parent.parent.parent
|
||||||
logger.info(f"Command: {' '.join(command)}")
|
logger.info(f"Command: {' '.join(command)}")
|
||||||
|
|
||||||
# In CI environment, redirect output to avoid buffer deadlock
|
# In CI environment, redirect stdout to avoid buffer deadlock but keep stderr for debugging
|
||||||
# Embedding servers use many print statements that can fill buffers
|
# Embedding servers use many print statements that can fill stdout buffers
|
||||||
is_ci = os.environ.get("CI") == "true"
|
is_ci = os.environ.get("CI") == "true"
|
||||||
if is_ci:
|
if is_ci:
|
||||||
stdout_target = subprocess.DEVNULL
|
stdout_target = subprocess.DEVNULL
|
||||||
stderr_target = subprocess.DEVNULL
|
stderr_target = None # Keep stderr for error debugging in CI
|
||||||
logger.info("CI environment detected, redirecting embedding server output to DEVNULL")
|
logger.info(
|
||||||
|
"CI environment detected, redirecting embedding server stdout to DEVNULL, keeping stderr"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
stdout_target = None # Direct to console for visible logs
|
stdout_target = None # Direct to console for visible logs
|
||||||
stderr_target = None # Direct to console for visible logs
|
stderr_target = None # Direct to console for visible logs
|
||||||
|
|||||||
Reference in New Issue
Block a user