Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit the experiment when the scenario file cannot properly import modules #510

Open
devos50 opened this issue Feb 21, 2022 · 1 comment
Open
Assignees

Comments

@devos50
Copy link
Contributor

devos50 commented Feb 21, 2022

Frequently, the module loaded through a scenario file requires additional imports, e.g., from Tribler. When a module cannot be imported, an error is printed to standard output but the experiment continues (even though the remainder of the module will not be active). This is because we are dynamically loading modules. See for example the following log output:

2022-02-18 07:44:06,796:WARNING:Scenario file gigachannel_small.scenario not found, attempting scenario file in experiment dir
2022-02-18 07:44:06,796:INFO:Scenario file found, using /var/scratch/pouwelse/jenkins2/workspace/validation_experiments/validation_experiment_gigachannels/gumby/experiments/gigachannel/gigachannel_small.scenario
2022-02-18 07:44:06,884:INFO:Unable to load gumby.modules.tribler_module as a local module, exception: No module named 'tribler_common'
2022-02-18 07:44:06,885:ERROR:Unable to import tribler_module from /var/scratch/pouwelse/jenkins2/workspace/validation_experiments/validation_experiment_gigachannels/gumby/gumby/modules as gumby.modules.tribler_module: No module named 'tribler_common'
2022-02-18 07:44:06,885:ERROR:Unable to import gumby.modules.tribler_module.TriblerModule (from tribler_module:1)
NoneType: None
2022-02-18 07:44:06,885:INFO:Loading module: gumby.modules.tribler_module.TriblerModule
2022-02-18 07:44:06,885:ERROR:ExperimentModule subclass expected in /var/scratch/pouwelse/jenkins2/workspace/validation_experiments/validation_experiment_gigachannels/gumby/experiments/gigachannel/gigachannel_small.scenario:1. Got: gumby.modules.tribler_module.TriblerModule

We could identify these kind of bugs earlier by exiting the process with a non-zero exit code when an import error occurs. The experiment should report a 'failure' status if one of the processes exits with a non-zero exit code.

@kozlovsky kozlovsky self-assigned this Feb 27, 2022
@kozlovsky
Copy link
Contributor

I can provide fix after #508 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants