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

Handle nomad exec termination events in order #10657

Merged
merged 4 commits into from
May 25, 2021
Merged

Commits on May 24, 2021

  1. e2e: stop suppressing unexpected EOF errors

    Mahmood Ali committed May 24, 2021
    Configuration menu
    Copy the full SHA
    b774acc View commit details
    Browse the repository at this point in the history
  2. exec: http: close websocket connection gracefully

    In this loop, we ought to close the websocket connection gracefully when
    the StreamErrWrapper reaches EOF.
    
    Previously, it's possible that that we drop the last few events or skip sending
    the websocket closure. If `handler(handlerPipe)` returns and `cancel` is called,
    before the loop here completes processing streaming events, the loop exits
    prematurely without propagating the last few events.
    
    Instead here, the loop continues until we hit `httpPipe` EOF (through
    `decoder.Decode`), to ensure we process the events to completion.
    Mahmood Ali committed May 24, 2021
    Configuration menu
    Copy the full SHA
    ab4b42f View commit details
    Browse the repository at this point in the history

Commits on May 25, 2021

  1. exec: api: handle closing errors differently

    refactor the api handling of `nomad exec`, and ensure that we process
    all received events before handling websocket closing.
    
    The exit code should be the last message received, and we ought to
    ignore any websocket close error we receive afterwards.
    
    Previously, we used two channels: one for websocket frames and another
    for handling errors. This raised the possibility that we processed the
    error before processing the frames, resulting into an "unexpected EOF"
    error.
    Mahmood Ali committed May 25, 2021
    Configuration menu
    Copy the full SHA
    a15a617 View commit details
    Browse the repository at this point in the history
  2. add a note about node connection failure and fallback

    Mahmood Ali committed May 25, 2021
    Configuration menu
    Copy the full SHA
    b294f63 View commit details
    Browse the repository at this point in the history