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

More fixes for Go connection fetching #1036

Merged
merged 20 commits into from
Jul 20, 2024
Merged

Conversation

grcevski
Copy link
Contributor

@grcevski grcevski commented Jul 17, 2024

There are two problems with our connection fetching code for Go:

  1. For gRPC, apparently the type can be an experimental gRPC ServeHTTP based handler. We need to ensure we don't try to read the connection through that.
  2. The HTTP code had a backup path for the connection info which can be plain wrong for nonstandard connections. We shouldn't do that to avoid bad information.

TODO:

  • Make a test based on ServeHTTP for gRPC (I'll follow-up on this in another PR, since I have to fix HTTP2 status parsing too)
  • Go TLS tests for both HTTP and gRPC (TLS connection were broken)
  • Figure out if we can get connection information for this other mode

@grcevski grcevski requested review from mariomac and marctc as code owners July 17, 2024 21:17
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.94%. Comparing base (c8e6a58) to head (0ba4910).

Files Patch % Lines
pkg/internal/ebpf/grpc/grpc.go 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1036      +/-   ##
==========================================
- Coverage   81.46%   76.94%   -4.52%     
==========================================
  Files         138      138              
  Lines       10988    11023      +35     
==========================================
- Hits         8951     8482     -469     
- Misses       1521     2021     +500     
- Partials      516      520       +4     
Flag Coverage Δ
integration-test 56.77% <95.00%> (+0.68%) ⬆️
k8s-integration-test ?
oats-test 37.40% <85.00%> (+0.17%) ⬆️
unittests 50.89% <5.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grcevski grcevski changed the title WIP: More fixes for Go connection fetching More fixes for Go connection fetching Jul 19, 2024
Copy link
Contributor

@mariomac mariomac left a comment

Choose a reason for hiding this comment

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

LGTM! (once the failing tests are fixed)

🚀

@grcevski grcevski merged commit 805db03 into grafana:main Jul 20, 2024
6 checks passed
@grcevski grcevski deleted the fix_grpc_conn branch July 20, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants