Skip to content
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

Drain stdin on attach #991

Merged
merged 1 commit into from
Jan 11, 2023

Commits on Jan 11, 2023

  1. Drain stdin on attach

    The Kubernetes e2e test flakes because of a token cancellation race
    between stdin and attach read:
    
    ```
    [FAIL] [sig-cli] Kubectl client Simple pod [It] should support inline execution and attach
    …
      << Timeline
    
      [FAILED] Expected
          <string>: read:stdin closed
    
      to contain substring
          <string>: read:value
      In [It] at: test/e2e/kubectl/kubectl.go:764 @ 01/04/23 15:09:48.618
    ```
    
    The issue is that we cancel the token immediately which stops reading
    from attach. But the container command `echo -n read: && cat && echo
    'stdin closed'` within the test provides additional data, which gets no
    time to be delivered.
    
    We now drain stdin accordingly and wait for all data to be passed down
    to the receiver.
    
    Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
    saschagrunert committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    86f4c99 View commit details
    Browse the repository at this point in the history