-
Notifications
You must be signed in to change notification settings - Fork 59
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
vdk-jobs-troubleshooting: Add thread-dump utility #1456
vdk-jobs-troubleshooting: Add thread-dump utility #1456
Conversation
3d7afdc
to
165377f
Compare
This change adds the implementation of a thread-dump utility to the vdk-jobs-troubleshooting plugin. The utility uses an http server, through which an administrator is able to force a stacktrace dump of all threads used by the python process of the data job. The server is bound to a port on the localhost, so to get the stacktrace, one needs to be attached to the data job pod. Testing Done: Added unit tests for the utility registry, and tested the plugin itself locally by running a simple data job and examining the execution logs. Signed-off-by: Andon Andonov <[email protected]>
165377f
to
21bc48f
Compare
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.
Please write functional test . The cookiecutter provides template - https://github.com/tozka/cookiecutter-vdk-plugin/blob/main/vdk-%7B%7Bcookiecutter.plugin_name%7D%7D/tests/test_plugin.py
The functional tests are very powerful mechanism to make sure the functionality we write really works as expected - as they are really "data jobs" that use that functionality.
...roubleshooting/src/vdk/plugin/jobs_troubleshoot/troubleshoot_utilities/healthcheck_server.py
Show resolved
Hide resolved
...-jobs-troubleshooting/src/vdk/plugin/jobs_troubleshoot/troubleshoot_utilities/thread_dump.py
Show resolved
Hide resolved
...lugins/vdk-jobs-troubleshooting/src/vdk/plugin/jobs_troubleshoot/jobs_troubleshoot_plugin.py
Outdated
Show resolved
Hide resolved
...lugins/vdk-jobs-troubleshooting/src/vdk/plugin/jobs_troubleshoot/jobs_troubleshoot_plugin.py
Outdated
Show resolved
Hide resolved
...-jobs-troubleshooting/src/vdk/plugin/jobs_troubleshoot/troubleshoot_utilities/thread_dump.py
Show resolved
Hide resolved
Add functional test. Minor code refactoring. Signed-off-by: Dako Dakov <[email protected]>
I just added a functional test. |
Add documentation. Remove redundant Optional type. Signed-off-by: Dako Dakov <[email protected]>
Remove unused import. Signed-off-by: Dako Dakov <[email protected]>
Remove unused import. Signed-off-by: Dako Dakov <[email protected]>
...roubleshooting/src/vdk/plugin/jobs_troubleshoot/troubleshoot_utilities/healthcheck_server.py
Outdated
Show resolved
Hide resolved
...roubleshooting/src/vdk/plugin/jobs_troubleshoot/troubleshoot_utilities/healthcheck_server.py
Outdated
Show resolved
Hide resolved
I think that there should be docs describing how to use it. |
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.
Looks good to me.
Remove redundancies. Signed-off-by: Dako Dakov <[email protected]>
I can see it's not release yet (the release job did not trigger ) . It's commented out but I think you can release it: |
* vdk-jobs-troubleshooting: Add thread-dump utility This change adds the implementation of a thread-dump utility to the vdk-jobs-troubleshooting plugin. The utility uses an http server, through which an administrator is able to force a stacktrace dump of all threads used by the python process of the data job. The server is bound to a port on the localhost, so to get the stacktrace, one needs to be attached to the data job pod. Testing Done: Added unit tests for the utility registry, and tested the plugin itself locally by running a simple data job and examining the execution logs. Signed-off-by: Andon Andonov <[email protected]> * vdk-jobs-troubleshooting: Add functional test Add functional test. Minor code refactoring. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: Address review feedback Add documentation. Remove redundant Optional type. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: remove unused import Remove unused import. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: remove unused import Remove unused import. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: Address review feedback Remove redundancies. Signed-off-by: Dako Dakov <[email protected]> Signed-off-by: Andon Andonov <[email protected]> Signed-off-by: Dako Dakov <[email protected]> Co-authored-by: ddakov <[email protected]>
* vdk-jobs-troubleshooting: Add thread-dump utility This change adds the implementation of a thread-dump utility to the vdk-jobs-troubleshooting plugin. The utility uses an http server, through which an administrator is able to force a stacktrace dump of all threads used by the python process of the data job. The server is bound to a port on the localhost, so to get the stacktrace, one needs to be attached to the data job pod. Testing Done: Added unit tests for the utility registry, and tested the plugin itself locally by running a simple data job and examining the execution logs. Signed-off-by: Andon Andonov <[email protected]> * vdk-jobs-troubleshooting: Add functional test Add functional test. Minor code refactoring. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: Address review feedback Add documentation. Remove redundant Optional type. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: remove unused import Remove unused import. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: remove unused import Remove unused import. Signed-off-by: Dako Dakov <[email protected]> * vdk-jobs-troubleshooting: Address review feedback Remove redundancies. Signed-off-by: Dako Dakov <[email protected]> Signed-off-by: Andon Andonov <[email protected]> Signed-off-by: Dako Dakov <[email protected]> Co-authored-by: ddakov <[email protected]>
This change adds the implementation of a thread-dump utility to the vdk-jobs-troubleshooting plugin.
The utility uses an http server, through which an administrator is able to force a stacktrace dump of all threads used by the python process of the data job. The server is bound to a port on the localhost, so to get the stacktrace, one needs to be attached to the data job pod.
Testing Done: Added unit tests for the utility registry, and tested the plugin itself locally by running a simple data job and examining the execution logs.
Signed-off-by: Andon Andonov [email protected]