Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/python-stderr-deadlock-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/python": patch
---

Fix `python.runScript()` deadlock when the Python subprocess produces more than ~64KB of stderr output. The previous implementation hardcoded `OTEL_LOG_LEVEL: "DEBUG"` in the subprocess environment, which caused OTEL-aware Python libraries (mlflow, opentelemetry-sdk, etc.) to emit verbose debug-level logging to stderr during import. Once stderr exceeded the OS pipe buffer, the Python process would block on `write()` indefinitely. Removing the hardcoded debug log level brings `runScript()` in line with `run()`, `runInline()`, and the streaming variants — none of which set `OTEL_LOG_LEVEL`.
1 change: 0 additions & 1 deletion packages/python/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export const python = {
}=trigger,${Object.entries(taskContext.attributes)
.map(([key, value]) => `${key}=${value}`)
.join(",")}`,
OTEL_LOG_LEVEL: "DEBUG",
},
},
throwOnError: false,
Expand Down