-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Describe the bug
If I have a multiple sets of controls in my experiment, and they all have before_activity_control
and after_activity_control
, (In addition I use an empty(or not empty) control in settings.yaml) and if I run the experiment using this command:
chaos --settings=settings.yaml run exp.json
Then only the first set of before and after activity is being called and not the rest.
Runtime versions
Python 3.9.2
CLI 1.10.0
Core library 1.22.1
To Reproduce
I've made a repository for that with the readme file:
https://github.com/WixoLeo/ctk-tests
We have a simple exp.json and a simple plugin for the chaos.
That plugin contains a simple probe and action. Along that it contains 2 control files. global_control.py and playground_control.py.
global_control is empty (it doesn't matter if it's empty or not, the result will be the same)
It's empty in order to reduce the amount of speculations of where could be the issue.
this control is being used only in settings.yaml
In the exp.json I've placed playground_control, 2 times, every event inside that file prints out the name of the function. So that we could see in the console which controls are being called and which aren't.
So if we run the experiment, we would expect to see a print of every control event twice.
However, for some reason, specifically the before and after activity events, are printed only once.
Additionally, before and after experiment control is being printed 3 times for some reason. When I would expect to see them only twice each.
Expected behavior
I would expect every activity control to be run from all controls.