-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unit Test performance #4
Comments
Thanks! I'm glad this example has been helpful. I haven't noticed this problem on my projects (maybe they need more tests :P). I wonder if you can trim some of the python build artifacts from [1] to reduce the number of symlinks. [1] bazel-hermetic-python/WORKSPACE Line 33 in 0a595dc
|
Sure, I can take a look at that although I expect there's not too much that can be excluded. One other possibility I was wondering about, which is probably less hermetic, is possibly leveraging the I'm also curious how you've found Bazel caching to be in CI with this approach. |
I don't know of a way to generate an absolute path for the custom python interpreter :( I haven't noticed anything wrt bazel caching in CI either. |
Hi, first just wanted to thank you for providing this project as an example. It's been helpful in my work to setup my own Python toolchain.
One question I had was around unit test performance. Once I got my own version of Python 3 successfully configured I noticed that Bazel includes the toolchain version of Python 3 in the runfiles for each test target. This is not that surprising as it would help to make each target hermetic and aligns with the
py_runtime
documentation since providing files + an interpreter is considered an in build runtime.However, on MacOS given the large number of files that need to be symlinked since the interpreter is now included I've noticed a huge slowdown when it comes to testing time. I've been briefly looking at using
interpreter_path
instead which would treat the runtime as a platform runtime and so not symlink the files. However, that requires an absolute path.Have you experienced this on any of your projects? Is there something that can be done here?
Thanks!
The text was updated successfully, but these errors were encountered: