dstandish opened a new pull request, #63731:
URL: https://github.com/apache/airflow/pull/63731

   The `Integration core otel` CI job was producing ~50k lines of log output,
   making failures nearly impossible to diagnose. Two sources were responsible:
   
   1. **Scheduler/api-server stdout flooding pytest capture.** 
`start_scheduler()`
      started both subprocesses with `stdout=None, stderr=None`, inheriting the
      parent's file descriptors. This caused all OTel `ConsoleMetricExporter` 
JSON
      (emitted every 5 seconds) to flow directly into pytest's `capfd` capture 
buffer.
      On any test failure pytest would then dump the entire buffer — tens of 
thousands
      of lines of metrics JSON — as "Captured stdout call".
   
   2. **`log.info("out-start...")` re-emitting the captured output.** After
      `capfd.readouterr()`, the test logged the full captured content back to 
stdout,
      which pytest re-captured and included in the failure output a second time.
   
   **Fix:**
   - Add `capture_output: bool = False` to `start_scheduler()`. When `False`
     (the default), redirect subprocess stdout/stderr to `subprocess.DEVNULL`.
     `dag_execution_for_testing_metrics` passes `capture_output=True` since it
     genuinely needs to parse console metrics output via `capfd`.
   - Remove the `log.info("out-start...")` / `log.info("err-start...")` debug
     statements that were re-emitting the full captured content unnecessarily.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude (claude-4.6-sonnet-medium)
   
   Generated-by: Claude (claude-4.6-sonnet-medium) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   Made with [Cursor](https://cursor.com)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to