Skip to content

Conversation

@mitchdenny
Copy link
Member

Related #39519

@mitchdenny mitchdenny requested a review from davidfowl June 19, 2023 06:14
Copy link
Contributor

@mgravell mgravell left a comment

Choose a reason for hiding this comment

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

looks good, added a couple of questions, but on the presumption that the answer to those questions is "we're fine": 👍

@mitchdenny mitchdenny merged commit 5ca9116 into dotnet:main Jun 20, 2023
@ghost ghost added this to the 8.0-preview6 milestone Jun 20, 2023
@mitchdenny
Copy link
Member Author

/backport to release/7.0

@ghost
Copy link

ghost commented Jun 20, 2023

Hi @mitchdenny. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@mitchdenny
Copy link
Member Author

/backport to release/6.0

@ghost
Copy link

ghost commented Jun 20, 2023

Hi @mitchdenny. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@mitchdenny backporting to release/7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Call HttpContext.Abort() when WebSocket.Abort() is called.
Using index info to reconstruct a base tree...
M	src/Middleware/WebSockets/src/WebSocketMiddleware.cs
M	src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs
CONFLICT (content): Merge conflict in src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs
Auto-merging src/Middleware/WebSockets/src/WebSocketMiddleware.cs
CONFLICT (content): Merge conflict in src/Middleware/WebSockets/src/WebSocketMiddleware.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Call HttpContext.Abort() when WebSocket.Abort() is called.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

@mitchdenny an error occurred while backporting to release/7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@github-actions
Copy link
Contributor

@mitchdenny backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Call HttpContext.Abort() when WebSocket.Abort() is called.
Using index info to reconstruct a base tree...
M	src/Middleware/WebSockets/src/WebSocketMiddleware.cs
M	src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs
CONFLICT (content): Merge conflict in src/Middleware/WebSockets/test/UnitTests/WebSocketMiddlewareTests.cs
Auto-merging src/Middleware/WebSockets/src/WebSocketMiddleware.cs
CONFLICT (content): Merge conflict in src/Middleware/WebSockets/src/WebSocketMiddleware.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Call HttpContext.Abort() when WebSocket.Abort() is called.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

@mitchdenny an error occurred while backporting to release/6.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.


public override string? SubProtocol => _wrappedSocket.SubProtocol;

public override void Abort()
Copy link
Member

Choose a reason for hiding this comment

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

I know we use this pattern everywhere (override and add code), but what happens if someone add a virtual overload to the base type? How would we find out so we could hook that one too?

Copy link
Member

Choose a reason for hiding this comment

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

We've sometimes written tests that reflect on the type and check for anything missing. Probably not worth the effort, I don't think anything virtual has been added to this type since it was first written for .NET 4.5.

Copy link
Member

Choose a reason for hiding this comment

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

I know we use this pattern everywhere (override and add code), but what happens if someone add a virtual overload to the base type? How would we find out so we could hook that one too?

This was a big issue for streams and we built an analyzer to help detect this. WebSocket isn't pervasive enough to warrant it but cc @stephentoub.

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants