Closed Bug 1232982 Opened 6 years ago Closed 6 years ago
Can't run ./create-test-environment successfully
58 bytes, text/x-review-board-request
$ ./create-test-environment <snip spam> Building Docker images. This could take a while and may consume a lot of internet bandwidth. If you don't want Docker images, it is safe to hit CTRL+c to abort this. Error running mach: ['build-all'] The error occurred in mach itself. This is likely a bug in mach itself or a fundamental problem with a loaded module. Please consider filing a bug against mach by going to the URL: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=mach If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: AttributeError: 'NoneType' object has no attribute 'base_url' File "/Users/gkruitbosch/dev/version-control-tools/venv/lib/python2.7/site-packages/mach/main.py", line 344, in run return self._run(argv) File "/Users/gkruitbosch/dev/version-control-tools/venv/lib/python2.7/site-packages/mach/main.py", line 432, in _run instance = cls(context) File "/Users/gkruitbosch/dev/version-control-tools/testing/vcttesting/docker_mach_commands.py", line 39, in __init__ d = Docker(state_file, docker_url, tls=tls) File "/Users/gkruitbosch/dev/version-control-tools/testing/vcttesting/docker.py", line 165, in __init__ docker_url = urlparse.urlparse(self.client.base_url) You will not be able to run tests that require Docker. Please see https://docs.docker.com/installation/ for how to install Docker. When Docker is installed, re-run this script finished creating test environment
Review commit: https://reviewboard.mozilla.org/r/28163/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/28163/
Attachment #8698984 - Flags: review?(gps)
Note: this patch is probably terrible python or whatever, but it let me at least use ./run-tests with the --no-docker option, and made the build not crash and burn when docker wasn't available. It does now print this all the time: Exception trying to create Docker client: Error while fetching server API version: ('Connection aborted.', error(2, 'No such file or directory')) which is the same error it was printing earlier... so this might not be the right "Fix" for the core issue, but arguably the exception here should return early because we *know* that we just set self.client to None, and so the next few lines are always going to throw the exception in comment #0.
https://hg.mozilla.org/hgcustom/version-control-tools/rev/2c660efe42dadec6866bf6d2612c20e61a7edf14 Bug 1232982 - don't break the build when docker's initialization fails, r=gps
Comment on attachment 8698984 [details] MozReview Request: Bug 1232982 - don't break the build when docker's initialization fails, r?gps https://reviewboard.mozilla.org/r/28163/#review25209 I landed this without the print. ::: testing/vcttesting/docker.py:158 (Diff revision 1) > + print "Exception trying to create Docker client:", ex Please don't print from library code.
Attachment #8698984 - Flags: review?(gps) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.