Skip to content

Conversation

@plengauer
Copy link
Owner

No description provided.

actions-bot-pl
actions-bot-pl previously approved these changes Oct 11, 2025
@plengauer plengauer force-pushed the 2230-background-jobs-in-github-actions-will-indefinitely-stall-the-step-in-case-the-streams-are-not-closed branch from ae4aeab to 16ff446 Compare November 9, 2025 17:24
@plengauer plengauer marked this pull request as ready for review November 9, 2025 17:46
Copilot AI review requested due to automatic review settings November 9, 2025 17:46
@plengauer plengauer enabled auto-merge (squash) November 9, 2025 17:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the handling of background job streams to prevent process hangs when child processes inherit stdout/stderr and don't terminate with their parent. The changes introduce timeout-based waiting mechanisms and restructure the GitHub Actions logging pipeline to use named pipes with explicit cleanup.

Key changes:

  • Added _otel_wait_for_process_with_timeout() utility function to wait for processes with a configurable timeout
  • Refactored GitHub Actions step logging to use a dual-pipe architecture with timeout-based cleanup
  • Reduced various timeout values to minimize potential hang durations

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/usr/share/opentelemetry_shell/api.sh Adds new timeout-based process waiting utility function
src/usr/share/opentelemetry_shell/api.observe.subprocesses.sh Removes job control logic and adds output suppression to background process
src/usr/share/opentelemetry_shell/api.observe.pipes.sh Implements timeout-based waiting for pipe observer processes and consolidates cleanup
src/usr/share/opentelemetry_shell/api.observe.logs.sh Removes job control logic, adds output suppression, and removes stderr_pid wait
actions/instrument/job/inject_and_init.sh Reduces timeout from 60s to 5s for Python process cleanup
actions/instrument/job/decorate_action.sh Restructures logging using dual named pipes with timeout-based cleanup
.github/workflows/test_github.yml Adds test case for background job handling

Copilot AI review requested due to automatic review settings November 9, 2025 18:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings November 9, 2025 18:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

@plengauer plengauer marked this pull request as draft November 9, 2025 20:06
auto-merge was automatically disabled November 9, 2025 20:06

Pull request was converted to draft

@plengauer plengauer marked this pull request as ready for review November 9, 2025 22:48
Copilot AI review requested due to automatic review settings November 9, 2025 22:48
@plengauer plengauer enabled auto-merge (squash) November 9, 2025 22:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

@plengauer plengauer merged commit 8811975 into main Nov 10, 2025
751 of 763 checks passed
@plengauer plengauer deleted the 2230-background-jobs-in-github-actions-will-indefinitely-stall-the-step-in-case-the-streams-are-not-closed branch November 10, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Background jobs in GitHub actions will indefinitely stall the step in case the streams are not closed

4 participants