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

fix: http/2 stream leaks #5775

Merged
merged 4 commits into from
Feb 25, 2025
Merged

fix: http/2 stream leaks #5775

merged 4 commits into from
Feb 25, 2025

Conversation

ed382
Copy link
Contributor

@ed382 ed382 commented Aug 21, 2024

Pull request description

When response bodies are not properly closed an HTTP/2 client can leak streams which can eventually lead to a failure case (i.e. stream error: stream ID 1; INTERNAL_ERROR) related HTTP/2 flow-control. Here is a more thorough description of the issue: googleapis/google-cloud-go#7440 (comment)

This fixes cases where the response body for an HTTP request was not closed, and also refactors some of the code to make it easier to see when the stream has been closed.

In a couple of cases, it relied on the SendStream method from the fiber package to close the stream, but I could not find anywhere in their docs or code base where it actually closed the stream.

Checklist (choose whats happened)

  • breaking change! (describe)
  • tested locally
  • tested on cluster
  • added new dependencies
  • updated the docs
  • added a test

Breaking changes

Changes

Fixes

@ed382 ed382 added the bug 🐛 Something is not working as should be label Aug 21, 2024
@ed382 ed382 self-assigned this Aug 21, 2024
@ed382 ed382 marked this pull request as ready for review August 22, 2024 09:39
@ed382 ed382 requested a review from a team as a code owner August 22, 2024 09:39
@ed382 ed382 closed this Jan 13, 2025
@ed382 ed382 reopened this Feb 20, 2025
@ed382 ed382 force-pushed the fix-request-leaks branch from 302165b to 94e57b1 Compare February 20, 2025 17:40
@ed382 ed382 requested a review from exu February 20, 2025 17:44
@ed382 ed382 force-pushed the fix-request-leaks branch from 94e57b1 to 579cb48 Compare February 21, 2025 05:58
@ed382 ed382 requested a review from vsukhin February 25, 2025 11:11
Copy link
Collaborator

@vsukhin vsukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. not sure, it will help in this case, but we can try

@ed382
Copy link
Contributor Author

ed382 commented Feb 25, 2025

verified basic cli operations manually:

  • executing a workflow
  • watching the workflow
  • getting workflow details
  • listing artifacts
  • download artifacts

@ed382 ed382 merged commit 3b5001e into main Feb 25, 2025
35 checks passed
@ed382 ed382 deleted the fix-request-leaks branch February 25, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something is not working as should be
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants