-
-
Notifications
You must be signed in to change notification settings - Fork 750
Add worker name as prefix to ThreadPoolExecutor name #9120
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
Conversation
|
The test that I have written is simply a copy of the test just above it, |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ± 0 27 suites ±0 9h 27m 3s ⏱️ - 8m 43s For more details on these failures, see this check. Results for commit e433592. ± Comparison against base commit 8e604a0. ♻️ This comment has been updated with latest results. |
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.
Thanks for implementing this. I agree about the name length concern.
This post seems to suggest that the linux kernel has a max length of 16 chars for thread names. Our current prefix already exceeds this so I assume it's not a problem. It seems that Python just sets the name as a string in threading.Thread(name=...), which means we can set it to whatever we like. I can't find any documentation that mentions a maximum length.
As we are both concerned about this I would recommend adding another test that creates a worker with a crazy long name. That would give us confidence that it's fine. You could merge the two existing tests into one, and then add a new one that explicitly tests a long name.
|
I have added a check for very long worker name. Also I have decided not to merge those 2 tests i.e. The |
jacobtomlinson
left a comment
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.
Sounds good to me!
|
The failing tests don't seem relevant to my PR here. Is there something I have to do from my end ? |
|
I agree flaky tests are unrelated |
Closes #9112
pre-commit run --all-filesHere I have implemented one of the proposed ways: Using the worker.name to generate the default threadpool name.
My doubts: The thread name might get longer. Will that affect anything? I am not sure if operating system has any limit on the size of thread name.