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: stop reading closed channel for/watch devcontainers endpoint#19373

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
DanielleMaywood merged 5 commits intomainfromdanielle/devcontainers/fix-nasty-bug
Aug 15, 2025

Conversation

DanielleMaywood
Copy link
Contributor

Fixes#19372

We increase the read limit to 4MiB (we use this limit elsewhere). We also make sure to stop sending messages ofcontainersCh becomes closed.

Fixes#19372We increase the read limit to 4MiB (we use this limit elsewhere). Wealso make sure to stop sending messages of `containersCh` becomesclosed.
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

If possible, I'd like to see a unit test or similar that reproduces the condition and validates the fix.

mafredri reacted with thumbs up emoji
@DanielleMaywood
Copy link
ContributorAuthor

If possible, I'd like to see a unit test or similar that reproduces the condition and validates the fix.

I've added a test in0ca20dc

If you remove the fix incoderd/workspaceagents.go you'll be able to test it fails before the fix and passes afterwards.

Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

This looks OK to me, but I also wonder if there's a way for us to detect us reaching the payload limit and log an error somewhere?

@DanielleMaywood
Copy link
ContributorAuthor

This looks OK to me, but I also wonder if there's a way for us to detect us reaching the payload limit and log an error somewhere?

We already do but as adebug log

d.logger.Debug(d.ctx,"error reading from websocket",slog.Error(err))

@johnstcn
Copy link
Member

This looks OK to me, but I also wonder if there's a way for us to detect us reaching the payload limit and log an error somewhere?

We already do but as adebug log

d.logger.Debug(d.ctx,"error reading from websocket",slog.Error(err))

Ah nice, so we can check forStatusMessageTooBig there and scream louder then. 👍 Might be a good separate PR

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Minor nit, but LGTM, nice work!

deferres.Body.Close()
}

conn.SetReadLimit(1<<22)// 4MiB
Copy link
Member

Choose a reason for hiding this comment

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

Nit: let's add a comment for this, as well as the compression, for posterity.

Re: compression, we might say that we chose nocontexttakeover to improve bandwidth cost/latency with minimal cpu/memory overhead even if contexttakeover has better compression.

@DanielleMaywoodDanielleMaywood merged commit205eb29 intomainAug 15, 2025
44 of 47 checks passed
@DanielleMaywoodDanielleMaywood deleted the danielle/devcontainers/fix-nasty-bug branchAugust 15, 2025 11:32
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 15, 2025
@DanielleMaywoodDanielleMaywood added the cherry-pick/v2.25Needs to be cherry-picked to the 2.25 release branch labelSep 8, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@DanielleMaywoodDanielleMaywood

Labels
cherry-pick/v2.25Needs to be cherry-picked to the 2.25 release branch
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

bug: devcontainers/watch endpoint reads from empty channel when message over 32KiB is received
3 participants
@DanielleMaywood@johnstcn@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp