openshift / openshift/cluster-node-tuning-operator

Make ExecCommandOnPod() context-aware in e2e pods test helper

Open
#1,558 0 comments 0 reactions 1 assignee View on GitHub

@mrniranjan is already working on this.

Since Jul 8, 2026.

Dominant language
Go
Stars
121
Forks
136
Avg merge
5d 21h
Merged PRs (30d)
21

Description

Summary

Make ExecCommandOnPod() in test/e2e/performanceprofile/functests/utils/pods/pods.go context-aware so callers can bound exec calls with a timeout/cancellation, instead of the helper internally using exec.StreamWithContext(context.TODO(), ...).

Rationale

During review of PR #1556, it was noted that new GOMAXPROCS-related e2e tests in test/e2e/performanceprofile/functests/1_performance/performance.go call pods.ExecCommandOnPod(), which is unbounded because the underlying helper uses context.TODO(). This means a stalled SPDY exec session could hang indefinitely, even though the pod cleanup path (DeferCleanup) was already fixed to use context.WithTimeout(...).

Since ExecCommandOnPod() is a shared utility used across many e2e tests, changing its signature/behavior was deferred to a follow-up to avoid unintended impact on other tests.

Affected areas

  • test/e2e/performanceprofile/functests/utils/pods/pods.go (ExecCommandOnPod implementation)
  • Call sites across test/e2e/performanceprofile/functests/... that use ExecCommandOnPod()

Acceptance criteria

  • ExecCommandOnPod() (or a new context-aware variant) accepts a context.Context parameter and passes it through to exec.StreamWithContext(...) instead of using context.TODO() internally.
  • Existing call sites are updated to pass an appropriate context (e.g., with a timeout), or a backward-compatible wrapper is provided to avoid breaking existing tests.
  • No regression in existing e2e test suites that rely on this helper.

References

Requested by: @mrniranjan

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.