m-lab / murakami

Run automated internet measurement tests in a Docker container.
Apache License 2.0
41 stars 11 forks source link

Initialize murakami_output before usage in speedtest-cli runner #101

Closed robertodauria closed 3 years ago

robertodauria commented 3 years ago

This closes https://github.com/m-lab/murakami/issues/100.


This change is Reviewable

critzo commented 3 years ago

@robertodauria I'm getting what looks like an unrelated build issue with this branch:

[main]       ----------------------------------------
[main]     
[main]       ERROR: Failed building wheel for cryptography
[main]     
[main]     Failed to build cryptography
[main]     ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
[main]     
[main]     Removing intermediate container 6e9dfe309c3d
[main]     The command '/bin/sh -c pip install 'poetry==1.1.7'' returned a non-zero code: 1
[Info]     Uploading images
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: The command '/bin/sh -c pip install 'poetry==1.1.7'' returned a non-zero code: 1
[Info]     Built on arm02
[Error]    Not deploying release.
critzo commented 3 years ago

@robertodauria I copied the file changed in this branch into internet-resilience. It built successfully but after deploying to a Balena managed devices it produced a new error when attempting to run a test:

 main  2021-10-25 18:16:33,486 server.py:106 INFO Running test: Speedtest-cli-multi-stream
 main  2021-10-25 18:16:33,487 speedtest.py:127 INFO Starting Speedtest multi-stream test...
 main  2021-10-25 18:16:34,709 server.py:110 ERROR Failed to run test Speedtest-cli-multi-stream: 'NoneType' object is not iterable
robertodauria commented 3 years ago

@critzo I made another tiny change. Could you please try again? There is also an underlying issue with speedtest-cli that's not running correctly in your case, but the expected result is that this runner does not crash and exports a JSON with the error message as one of the fields.

(Also: the change in git's push behavior in the new version confused me, and I merged this by mistake just by running git push. Let's just keep working on this PR, I've rolled back the merge on master. :roll_eyes: )