Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Leaking yamux session after HTTP handler is closed#329

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 4 commits intomainfromcloserace
Feb 19, 2022

Conversation

kylecarbs
Copy link
Member

Closes#317. The httptest server cancels the context after the connection
is closed, but if a connection takes a long time to close, the request
would never end. This applies a context to the entire listener that cancels
on test cleanup.

After discussion with@bryphe-coder, reducing the parallel limit on
Windows is likely to reduce failures as well.

@codecov
Copy link

codecovbot commentedFeb 18, 2022
edited
Loading

Codecov Report

Merging#329 (8372c59) intomain (f7b4849) willincrease coverage by3.84%.
The diff coverage is82.14%.

Impacted file tree graph

@@            Coverage Diff             @@##             main     #329      +/-   ##==========================================+ Coverage   63.61%   67.45%   +3.84%==========================================  Files          69      140      +71       Lines         786     7443    +6657       Branches       77       77              ==========================================+ Hits          500     5021    +4521- Misses        271     1910    +1639- Partials       15      512     +497
FlagCoverage Δ
unittest-go-macos-latest66.29% <82.14%> (?)
unittest-go-ubuntu-latest67.47% <82.14%> (?)
unittest-go-windows-202265.70% <94.44%> (?)
unittest-js63.61% <ø> (ø)
Impacted FilesCoverage Δ
pty/pty_other.go35.89% <60.00%> (ø)
pty/start_other.go70.83% <60.00%> (ø)
provisionerd/provisionerd.go69.33% <66.66%> (ø)
coderd/coderdtest/coderdtest.go100.00% <100.00%> (ø)
peer/conn.go76.72% <100.00%> (ø)
codersdk/files.go76.92% <0.00%> (ø)
site/embed.go83.14% <0.00%> (ø)
cli/workspaces.go100.00% <0.00%> (ø)
database/pubsub_memory.go87.17% <0.00%> (ø)
... and66 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatef7b4849...8372c59. Read thecomment docs.

@kylecarbskylecarbsforce-pushed thecloserace branch 2 times, most recently from263f17a to6126814CompareFebruary 18, 2022 23:22
Closes#317. The httptest server cancels the context after the connectionis closed, but if a connection takes a long time to close, the requestwould never end. This applies a context to the entire listener that cancelson test cleanup.After discussion with@bryphe-coder, reducing the parallel limit onWindows is likely to reduce failures as well.
@kylecarbskylecarbsenabled auto-merge (squash)February 19, 2022 01:03
-name:Test with Mock Database
shell:bash
env:
GOCOUNT:${{ runner.os == 'Windows' && 3 || 5 }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition 👍

kylecarbs reacted with heart emoji
srv:=httptest.NewServer(handler)
srv:=httptest.NewUnstartedServer(handler)
srv.Config.BaseContext=func(_ net.Listener) context.Context {
ctx,cancelFunc:=context.WithCancel(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch... It's surprising that this is necessary, but glad you found it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It genuinely amazed me.

Copy link
Contributor

@bryphe-coderbryphe-coder left a comment

Choose a reason for hiding this comment

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

Thanks for working so hard to track these down@kylecarbs !

kylecarbs reacted with heart emoji
@kylecarbskylecarbsenabled auto-merge (squash)February 19, 2022 01:12
-ubuntu-latest
-macos-latest
-windows-latest
-windows-2022
Copy link
Contributor

Choose a reason for hiding this comment

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

Per our discussion in slack - we may want to consider bumping the cache in one of these ways:

  • Adding a-v0- parameter that we can bump to invalidate the cache
  • Usingmatrix.os instead ofrunner.os for the cache here - that will usewindows-2022 instead ofwindows for the cache key

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ahh that's a great idea! Changing now.

@kylecarbskylecarbsforce-pushed thecloserace branch 2 times, most recently from2a0a153 to6c68e41CompareFebruary 19, 2022 01:25
@kylecarbskylecarbs merged commit65de96c intomainFeb 19, 2022
@kylecarbskylecarbs deleted the closerace branchFebruary 19, 2022 04:06
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@bryphe-coderbryphe-coderbryphe-coder approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@kylecarbskylecarbs

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Fix websocket/yamux/drpc goleak failure on Windows

2 participants

@kylecarbs@bryphe-coder

[8]ページ先頭

©2009-2025 Movatter.jp