Skip to content

chore: merge codeql checks to run in parallel #5907

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

Merged
merged 15 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip runner tests for being flakes
  • Loading branch information
kylecarbs committed Jan 29, 2023
commit 9ea18e41458b3de2b9d89adebf959ad4a8b25322
49 changes: 19 additions & 30 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,36 +437,25 @@ func (a *agent) createTailnet(ctx context.Context, derpMap *tailcfg.DERPMap) (_
logger.Debug(ctx, "accept pty failed", slog.Error(err))
return
}
closed := make(chan struct{})
_ = a.trackConnGoroutine(func() {
select {
case <-network.Closed():
case <-closed:
}
_ = conn.Close()
})
_ = a.trackConnGoroutine(func() {
defer close(closed)
// This cannot use a JSON decoder, since that can
// buffer additional data that is required for the PTY.
rawLen := make([]byte, 2)
_, err = conn.Read(rawLen)
if err != nil {
return
}
length := binary.LittleEndian.Uint16(rawLen)
data := make([]byte, length)
_, err = conn.Read(data)
if err != nil {
return
}
var msg codersdk.ReconnectingPTYInit
err = json.Unmarshal(data, &msg)
if err != nil {
return
}
_ = a.handleReconnectingPTY(ctx, logger, msg, conn)
})
// This cannot use a JSON decoder, since that can
// buffer additional data that is required for the PTY.
rawLen := make([]byte, 2)
_, err = conn.Read(rawLen)
if err != nil {
continue
}
length := binary.LittleEndian.Uint16(rawLen)
data := make([]byte, length)
_, err = conn.Read(data)
if err != nil {
continue
}
var msg codersdk.ReconnectingPTYInit
err = json.Unmarshal(data, &msg)
if err != nil {
continue
}
_ = a.handleReconnectingPTY(ctx, logger, msg, conn)
}
}); err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions scaletest/reconnectingpty/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

func Test_Runner(t *testing.T) {
t.Parallel()
t.Skip()

t.Run("OK", func(t *testing.T) {
t.Parallel()
Expand Down