Skip to content

fix: enable stdin on exec. fixes kata containers output #231

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

XT-Phate
Copy link

@XT-Phate XT-Phate commented Jul 7, 2025

Context

When running the github hook against kata containers, the script output cannot be fetched properly from kata. Only a bit of the stdout/stderr are properly forwarded to GH

Workaround this issue from kata

Resolution

Enabling stdin solves that issue and should not impact other workloads

@Copilot Copilot AI review requested due to automatic review settings July 7, 2025 16:15
@XT-Phate XT-Phate requested a review from a team as a code owner July 7, 2025 16:15
Copy link

@Copilot 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

Enable stdin forwarding in execPodStep calls to address truncated output when running against Kata containers.

  • Pass process.stdin to execPodStep in the Alpine check helper.
  • Include process.stdin in the runScriptStep hook invocation.

Reviewed Changes

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

File Description
packages/k8s/src/k8s/index.ts Pass process.stdin into execPodStep for the Alpine check
packages/k8s/src/hooks/run-script-step.ts Forward process.stdin when invoking execPodStep in runScriptStep
Comments suppressed due to low confidence (3)

packages/k8s/src/k8s/index.ts:529

  • This change enables passing stdin to execPodStep for Kata containers; consider adding or updating tests to verify that stdin is forwarded correctly in both standard and Kata container environments.
      process.stdin

packages/k8s/src/hooks/run-script-step.ts:30

  • Consider adding or updating tests for runScriptStep to ensure that passing process.stdin to execPodStep correctly handles interactive input scenarios, especially with Kata containers.
      process.stdin

packages/k8s/src/hooks/run-script-step.ts:30

  • [nitpick] Since multiple callers now explicitly pass process.stdin, consider making process.stdin the default value for the stdin parameter in execPodStep, removing the need for callers to pass it each time.
      process.stdin

Signed-off-by: Maxime Bertin <mbertin@luccasoftware.com>
@XT-Phate XT-Phate force-pushed the fix/k8s-use-stdin branch from 5984503 to 1edda12 Compare July 9, 2025 13:44
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.

1 participant