molecule
molecule copied to clipboard
molecule fails to reset itself when driver is changed in config
I observed that molecule gets confused when a driver is swithced inside a scenario, like moving from delegated
to docker
casing confusing errors that do not give a hint about what caused them.
--> Action: 'destroy'
ERROR! the playbook: None could not be found
An error occurred during the test sequence action: 'destroy'. Cleaning up.
ERROR:
--> Scenario: 'foo'
--> Action: 'cleanup'
Skipping, cleanup playbook not configured.
--> Scenario: 'foo'
--> Action: 'destroy'
ERROR! the playbook: None could not be found
Funny part is that this scenario is not supposed to have these playbooks.
Removing temp files of molecule does solve the issue, but most users do not even know where these are located.
I am not yet sure how we can decide when we are in a tainted environment and to suggest performing a reset as we do want to do it by accident. Maybe timestamping molecule.yml file would be enough? When this is changed we can throw a clearly visible warning which tells user that config was tainted since last run and that they may want to do a reset if somethign fails.
Thanks @ssbarnea, removed temporal files (in my case ~/.cache/molecule/) as workaround and everything ok.
There is now the molecule reset
command that can do this but is not run automatically.
If anyone wants to implement this it would be really nice first feature.