We've had a few cases where we've accidentally made Python unit tests depend on external resources (eg logs on S3), which means the tests fail when offline, plus result in non-deterministic behaviour when S3 is being flaky or the logs are expired. Let's just block all external requests during the pytest run to prevent this from happening. In order for this to have caught bug 1370229, we'll also need to stop the exceptions being swallowed (bug 1370246).
Created attachment 8876222 [details] [review] [treeherder] mozilla:block-unmocked-requests > mozilla:master
Comment on attachment 8876222 [details] [review] [treeherder] mozilla:block-unmocked-requests > mozilla:master There was one small change request, but I didn't bother to make a "request for change" so I don't slow you down. Thanks for catching and fixing this. :)
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/c6432016947fbd2dea128abd5710986450854b68 Bug 1370249 - Block unmocked HTTP requests during Python tests This prevents tests from inadvertently depending on external resources (for example logs on S3) due to missing mocked responses.