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

[serverless-1.30] fix: bad connection handling for in cluster dialer #647

Conversation

matejvasek
Copy link
Collaborator

@matejvasek matejvasek commented Aug 23, 2023

backport knative#1800
This makes io: read/write on closed pipe go away.

* fix: bad connection handling for in cluster dialer

Connections were closed from wrong end of io.Pipe
which resulted in confusing error logs.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* feat: DialContext() better error handling

Now DialContext() returns some errors immediately
instead of deferring it Read/Write operation on the returned connection.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* feat: DialContext() more better error handling

Now ContextDial() tries to parse socat's stderr and translate it to Go's net.OpError
instead of just creating error with whole stderr embedded in it.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Apply suggestions from code review

Co-authored-by: Lance Ball <lball@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>
@openshift-ci openshift-ci bot requested review from nainaz and vyasgun August 23, 2023 21:42
@matejvasek matejvasek requested review from dsimansk and jrangelramos and removed request for nainaz and vyasgun August 23, 2023 21:42
@matejvasek
Copy link
Collaborator Author

PTAL @jrangelramos

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2023

Codecov Report

❗ No coverage uploaded for pull request base (serverless-1.30@6b27b2a). Click here to learn what that means.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@                Coverage Diff                 @@
##             serverless-1.30     #647   +/-   ##
==================================================
  Coverage                   ?   63.26%           
==================================================
  Files                      ?       95           
  Lines                      ?    12859           
  Branches                   ?        0           
==================================================
  Hits                       ?     8135           
  Misses                     ?     4059           
  Partials                   ?      665           
Flag Coverage Δ
e2e-test 39.55% <0.00%> (?)
e2e-test-runtime-go 28.04% <0.00%> (?)
e2e-test-runtime-node 29.16% <0.00%> (?)
e2e-test-runtime-python 29.16% <0.00%> (?)
e2e-test-runtime-quarkus 29.29% <0.00%> (?)
e2e-test-runtime-springboot 28.20% <0.00%> (?)
e2e-test-runtime-typescript 29.29% <0.00%> (?)
integration-tests 50.08% <0.00%> (?)
unit-tests-macos-latest 48.38% <0.00%> (?)
unit-tests-ubuntu-latest 52.22% <0.00%> (?)
unit-tests-windows-latest 48.43% <0.00%> (?)

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

@matejvasek matejvasek changed the title fix: bad connection handling for in cluster dialer [serverless-1.30] fix: bad connection handling for in cluster dialer Aug 23, 2023
@matejvasek
Copy link
Collaborator Author

@dsimansk please check this is a compatible change

@dsimansk
Copy link
Collaborator

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, matejvasek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [dsimansk,matejvasek]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dsimansk
Copy link
Collaborator

/override "On Cluster RT Test (1.20.5, ubuntu-latest)"
/override "On Cluster Test (1.20.5, ubuntu-latest)"

@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2023

@dsimansk: Overrode contexts on behalf of dsimansk: On Cluster RT Test (1.20.5, ubuntu-latest), On Cluster Test (1.20.5, ubuntu-latest)

In response to this:

/override "On Cluster RT Test (1.20.5, ubuntu-latest)"
/override "On Cluster Test (1.20.5, ubuntu-latest)"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit 8331fc8 into openshift-knative:serverless-1.30 Aug 24, 2023
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants