-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WIP: use gobwas/ws instead of gorilla/websocket #13932
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Gekko0114 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @Gekko0114! It looks like this is your first PR to knative/serving 🎉 |
Hi @Gekko0114. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @dprotaso, I've created a WIP in the downstream serving repo to test the changes I've made. |
/retest |
/retest |
Looks like the websocket tests are failing |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #13932 +/- ##
==========================================
- Coverage 86.25% 86.24% -0.02%
==========================================
Files 199 199
Lines 14749 14753 +4
==========================================
+ Hits 12722 12723 +1
- Misses 1726 1728 +2
- Partials 301 302 +1
☔ View full report in Codecov by Sentry. |
Yes, the websocket tests in e2e testing are failing. The Dialer in gobwas/ws does not have a Proxy field, which I think is causing the problem, but I am not sure. If you have any suggestions, please let me know. |
e1d1d7a
to
e311403
Compare
@Gekko0114 I run the PR locally. So it seems you dont need the proxy stuff (websocket_test.go). However you need to have the host passed.
With
|
So here is why the new framework does not work from the client side. The old framework uses direct http calls
The new framework though since it uses tcp directly and upgrades later by editing the tcp con stuff directly
I get:
Hosts are merged. I managed to make it work by commenting this line out: serving/vendor/github.com/gobwas/ws/http.go Line 302 in 2dd57a9
This is not to be used directly of course for our tests it is a proof of concept. |
@skonto , I see. Thank you so much for your investigation!
So, we should fix this issue on gobwas/ws first, right? |
Yes could you try start the discussion or do a PR there to get things going? What I would propose is that if user sets the host header the library should pass it during connection upgrades and still use the url for direct connections to some target (in this case it is the ingress ip that is being target). I am also a bit concerned about this inflexibility of the new lib. |
@skonto, |
Hey all - sorry to jump in here as I've been informed of this work by @skonto . I'm not sure if this changes your plans for this work at all, but a group I've started at Red Hat is currently in active discussions with the original maintainers of the Gorilla Web Toolkit to adopt the project and reboot it. While there are no hard timelines at this time, feel free to contact me if you have any questions or would like to know more. |
Hi @AlexVulaj |
FYI |
@Gekko0114 Yes, it should be the case that you won't need to replace it; however, I will caution that I have no promises on an official timeline of exactly when that reboot will occur. What I can say is that there is interest from both parties (the Gorilla maintainers as well as our group of RH engineers) to move forward. Let me know if I can answer anything else! |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Closing this for now - seems like RedHat might become owners of gorilla/websocket - so we'll pause this for now |
Fixes #13824
Related to knative/pkg#2730
Proposed Changes
https://github.com/gorilla/websocket is deprecated and unmaintained.
We should switch to something that is and ensure everything works as expected (ie. draining in queue proxy etc).
/kind deprecation
Release Note