-
Notifications
You must be signed in to change notification settings - Fork 887
fix: Add resiliency to daemon connections #1116
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1116 +/- ##
==========================================
- Coverage 66.61% 66.57% -0.04%
==========================================
Files 257 257
Lines 16011 16082 +71
Branches 156 156
==========================================
+ Hits 10665 10707 +42
- Misses 4266 4280 +14
- Partials 1080 1095 +15
Continue to review full report at Codecov.
|
provisionersdk/transport.go
Outdated
// TransportPipe creates an in-memory pipe for dRPC transport. | ||
func TransportPipe() (*yamux.Session, *yamux.Session) { | ||
clientReader, clientWriter := io.Pipe() | ||
serverReader, serverWriter := io.Pipe() | ||
yamuxConfig := yamux.DefaultConfig() | ||
yamuxConfig.LogOutput = io.Discard | ||
yamuxConfig.LogOutput = os.Stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this turned on for debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
t.Run("PayloadTooBig", func(t *testing.T) { | ||
t.Parallel() | ||
if runtime.GOOS == "windows" { | ||
// Takes too long to allocate memory on Windows! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪟🪟🪟
5fb7b25
to
b401270
Compare
Connections could fail when massive payloads were transmitted. This fixes an upstream bug in dRPC where the connection would end with a context canceled if a message was too large. This adds retransmission of completion and failures too. If Coder somehow loses connection with a provisioner daemon, upon the next connection the state will be properly reported.
Connections could fail when massive payloads were transmitted.
This fixes an upstream bug in dRPC where the connection would
end with a context canceled if a message was too large.
This adds retransmission of completion and failures too. If
Coder somehow loses connection with a provisioner daemon,
upon the next connection the state will be properly reported.