Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1505086: use
mach python
to submit build telemetry r=ted
While attempting to improve the build telemetry submission logic, I found a bug in the way telemetry submission works. Essentially the submission script was failing to import any of the required packages (specifically `mozbuild.telemetry` in this case) as the method used to modify path was incorrect and the script was running outside of the virtualenv. The invocation is also sending stdout and stderr to `/dev/null`, making this problem even less obvious. When I fixed the path modifications, I realized that `mozbuild` imports will require a long chain of other imports (and transitively, more `sys.path` modifications) such as `which`, `mach`, `mozautomation`, etc to complete. When I tested the submission script, I did so by running `mach python build/submit_telemetry_data.py`, which runs the script in a virtualenv with all required packages installed. That's likely part of the reasons I overlooked this issue in testing. Rather than go through the process of importing every dependency of `mozbuild`, this commit changes the invocation of the submission script to go through `mach python`. Things seem to work as expected with this change. Differential Revision: https://phabricator.services.mozilla.com/D11278
- Loading branch information