fix: work around broken log API endpoint by ignoring RST_STREAM data frames#1877
Merged
Conversation
5fb5050 to
b40f69a
Compare
Contributor
|
Haha! Force is strong with this one! Current call even runs into error these days: ~/M/cli (master|✔) $ node ~/Mittwald_Dev/cli/bin/run.js container logs c-XXXXXX
┌──────────────────────────────────────────────────────────────────────────────┐
│ API CLIENT ERROR │
│ [...] │
│ An error occurred while communicating with the API: aborted │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
versus branch checkout working as expected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces a very ugly workaround for the "container logs" command, with currently hangs indefinitely (see #1677).
The reason for this issue is that the respective API endpoints chooses to reset the HTTP/2 data stream with a RST_STREAM frame, instead of properly ending the stream.
Until this can be fixed upstream, we work around this by re-implementing the respective API client, using low-level http2 client libraries, which give us direct access to the HTTP/2 data frames and allowing us to deliberately ignore the RST_STREAM frame.
Fixes #1677