-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: prevent Python subprocess deadlock by removing hardcoded OTEL_LOG_LEVEL DEBUG #3392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -89,15 +89,19 @@ export const python = { | |||||
| nodeOptions: { | ||||||
| ...(options.nodeOptions || {}), | ||||||
| env: { | ||||||
| ...process.env, | ||||||
| // Filter out parent OTEL vars to prevent stderr flood | ||||||
| ...Object.fromEntries( | ||||||
| Object.entries(process.env).filter( | ||||||
| ([key]) => !key.startswith("OTEL_") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 JavaScript's
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||
| ) | ||||||
| ), | ||||||
| ...options.env, | ||||||
| TRACEPARENT: carrier["traceparent"], | ||||||
| OTEL_RESOURCE_ATTRIBUTES: `${ | ||||||
| SemanticInternalAttributes.EXECUTION_ENVIRONMENT | ||||||
| }=trigger,${Object.entries(taskContext.attributes) | ||||||
| .map(([key, value]) => `${key}=${value}`) | ||||||
| .join(",")}`, | ||||||
| OTEL_LOG_LEVEL: "DEBUG", | ||||||
| }, | ||||||
| }, | ||||||
| throwOnError: false, | ||||||
|
|
@@ -151,7 +155,12 @@ export const python = { | |||||
| nodeOptions: { | ||||||
| ...(options.nodeOptions || {}), | ||||||
| env: { | ||||||
| ...process.env, | ||||||
| // Filter out parent OTEL vars to prevent stderr flood | ||||||
| ...Object.fromEntries( | ||||||
| Object.entries(process.env).filter( | ||||||
| ([key]) => !key.startswith("OTEL_") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Same bug as in
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||
| ) | ||||||
| ), | ||||||
| ...options.env, | ||||||
| TRACEPARENT: carrier["traceparent"], | ||||||
| OTEL_RESOURCE_ATTRIBUTES: `${ | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 OTEL env filtering not applied consistently across all methods
The OTEL env var filtering was applied to
runScript(line 93-97) andrunInline(line 158-163), but not torun(line 32) or any of thestream.*methods (stream.runat line 213,stream.runScriptat line 260,stream.runInlineat line 305). All of these still use...process.envdirectly. If the intent is to "prevent stderr flood" from parent OTEL vars leaking into Python subprocesses, the same issue presumably exists for all execution paths. This inconsistency may be intentional (perhaps only script-based methods are affected), but it's worth confirming.(Refers to line 32)
Was this helpful? React with 👍 or 👎 to provide feedback.