some of our wrapper target run nested multiple bazel commands, causing the intermittent issues in the way python is detecting the current modules in the python path.
common failure mode would be something like:
Traceback (most recent call last):
File "/data/OTHER_HOST/mongo/bazel/wrapper_hook/wrapper_hook.py", line 193, in <module>
main()
File "/data/OTHER_HOST/mongo/bazel/wrapper_hook/wrapper_hook.py", line 86, in main
from bazel.auto_header.auto_header import gen_auto_headers
File "/data/OTHER_HOST/mongo/bazel/auto_header/auto_header.py", line 5, in <module>
import json
ModuleNotFoundError: No module named 'json'