Respect port provided by the client && Switch from urllib.urlparse to simple substring replacement.#10364
Conversation
|
Hi @amaltaro, This is a change enclosed completely in the |
|
Jenkins results:
|
mapellidario
left a comment
There was a problem hiding this comment.
I do like the idea of getting rid of urlllib.parse, kudos!
However I think I missed that bytes is not imported when reviewing #10330 and added some comments.
Thanks Todor, sorry for disturbing with an unrequested review!
3954130 to
0adf701
Compare
|
Jenkins results:
|
amaltaro
left a comment
There was a problem hiding this comment.
Todor, once you fix those unit tests, make another review request please.
|
They are fixed @amaltaro , It is only the jenkins run that we are waiting for. |
|
Jenkins results:
|
796a13e to
a7b03ed
Compare
|
Jenkins results:
|
|
@amaltaro I cannot figure out why this one fails: I simply fail to see how my changes affect it. |
|
Todor, I would suggest you to look at what gets reported in jenkins (it's also a good exercise!), here is some help to navigate there: and also try to reproduce this error with your docker unit tests. I haven't looked at it myself, so it could be related, or not ;) |
|
@amaltaro I already did these both - examining jenkins in deep and running the failing test with nose in my private instance, and still cannot relate my changes to the failing test in a module few levels up. |
|
Yes, it looks like that file is no longer available; or the web server is having issues to serve that file. I made a new GH issue such that we can fix that unit test in the future: #10367 |
|
@amaltaro it is indeed an error due to a hard coded url [1] in the test and this one if you try to browse it yourself it fails with the HTTTP erro 500 - internal server error. And if I need to be 100% strict on the fact that my change has no relation to this error here is what is passed to [2] |
|
Sorry @amaltaro - I missed your previous comment. Thanks for creating the issue! |
a451fa2 to
f9ac993
Compare
|
Jenkins results:
|
|
Jenkins results:
|
|
This is looking much better now, timing is very close between the different approaches as well: |
… simple substring replacement. Remove unneeded imports Add string prefix && Remove logger from PortForward class. Import bytes
33dc220 to
8f0d395
Compare
|
Jenkins results:
|
|
Jenkins results:
|
mapellidario
left a comment
There was a problem hiding this comment.
Thanks Todor for the changes! :) Looks good to me now!
amaltaro
left a comment
There was a problem hiding this comment.
Thanks Todor, it looks good to me.
Fixes #10359
Status
ready
Description
While we developing the port forwarding logic, we did not take into account the cases when the client actually provides a port as part of the url. Along the way few measurements happened regarding the efficiency of the two approaches:
urllib.urlparseto parse the whole url in components and just change what is neededThe current change switches back to the sub string replacement mechanism, which implicitly satisfies the major requirement for the issue - Not to change ports provided with the url by the client.
Is it backward compatible (if not, which system it affects?)
YES
Related PRs
No
External dependencies / deployment changes
No