-
Notifications
You must be signed in to change notification settings - Fork 104
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
Replaced reuse_addr with something more insisting #2757
Replaced reuse_addr with something more insisting #2757
Conversation
68aeca8
to
eefdf1c
Compare
In particular I would appreciate input on the approach and docs. |
Codecov Report
@@ Coverage Diff @@
## main #2757 +/- ##
==========================================
+ Coverage 65.20% 65.35% +0.14%
==========================================
Files 652 652
Lines 53630 53502 -128
Branches 4818 4752 -66
==========================================
- Hits 34970 34965 -5
+ Misses 17058 16934 -124
- Partials 1602 1603 +1
Continue to review full report at Codecov.
|
Looks good. The comment is informative and helps explain the different issues with sockets in the implementation. |
@@ -57,14 +57,15 @@ async def _eq_submit_job(self, script_filename): | |||
|
|||
|
|||
def _get_executor(custom_port_range, name="local"): | |||
_, port, _ = find_available_port(custom_range=custom_port_range, reuse_addr=True) | |||
if name == "local": | |||
cluster_kwargs = { | |||
"silence_logs": "debug", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason of the removal of the port when running locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the LocalDaskExecutor runs a server, hence does not need a port
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does (I think), but when running locally we are not restricted by infrastructure firewall 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh - ok. So it's free to pick whatever port id wants then, which it does when we do not provide a port-number.
eefdf1c
to
e662866
Compare
Following up on @frode-aarstad 's challenge 😄 I started to write tests for this and discovered quite a lot of funky behaviour. Hopefully these tests with docs adequately describes current behaviour and provides users of this module some insight into what to expect... |
Looks very good. Tested and worked fine on WSL2 |
e662866
to
ccedbea
Compare
Looks very good - also good with more tests verifying the behavior! 👏 |
@BjarneHerland : I tried to find an issue/PR with questions of thread-pool; could not find now. Easiest to reach me on email joakim.hove AT opm-op.com Might be a bit tight today. Cool if you post a link to the issue/PR here. Thank you. |
test ert please |
test ctest please |
@joakim-hove the issue you are looking for is located here #2650 |
test this please |
awaiting further improvements wrt testing
ccedbea
to
05ebcff
Compare
05ebcff
to
773c653
Compare
test ert please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good! Nice with good documented testing verifying the behavior of this! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Only had a small question
773c653
to
f826b75
Compare
Rename "reuse_addr" to "will_close_then_reopen_socket" to make users of this flag conscious about why it is there. Added reasoning and cleaned up some rather clunky logic in find_available_port(). Cleaned up unnecessary use of the flag in tests and code. Added extensive tests.
f826b75
to
fa4f4d9
Compare
If no other questions or concerns, I'll just merge this one. Would be interesting, though, to identify one or two tests crucial in this context. |
Issue
Resolves #2728
Approach
Renamed ™reuse_addr" to "will_close_then_reopen_socket" to make users of this flag conscious of why it is there.
Added documentation with reasoning and cleaned up some rather clunky logic in find_available_port(). Cleaned up unnecessary use of the flag in tests and code.
Pre review checklist