Hey guys,
there seem to be a fresh version of https://pypi.org/project/sh/ released 15h ago (at the time of writing this), which is a minor bump (despite being ~3 years in develop, but let's shelve that for now). The thing is it breaks molecule converge (and possibly other tasks as well).
Or at least in the instances/config I'm using it in.
The case in question is trying to run DO provisioner using 2.x branch of molecule.
More details as per the ticket's template.
When force-installed the previous version: pip install sh==1.12.14 it worked just fine.
Not sure if that's an issue of of molecule or that said package, but reporting here, since so far it seem like we're maybe trying to pass a variable in a format that is not well formatted, given the error message. But that's just a hunch.
molecule==2.22
ansible==2.9.0
Molecule installation method: pip
Ansible installation method (one of): pip
molecule provisioning ran OK
'env': value u'/[a project]/provisioning/.env.yml' of env key 'MOLECULE_ENV_FILE' must be a str
please note I do not have the .env.yml file anywhere added explicitly in my provisioning folder (or subfolders for that matter).
fwiw, I've noticed that molecule's molecule/test/conftest.py:run_command is broken with this new version of sh.py, breaking molecule's testsuite. The error message is different but forcing sh == 1.12.14 makes it work again.
Yep, broke my plugin test suite...
Let's add a bound for now as a quick fix and then work to adapt to changes?
This might merit a new quick release to unbreak the world...
New version of sh.py added checks on the environment arguments, since commit https://github.com/amoffat/sh/commit/5b274778fb4be647bbb95f9bec14153f186bcc1f.
For molecule/test/conftest.py:run_command, changing the env=os.environ to env=os.environ.copy() seems to make the functional testsuite happier. Unfortunately, it doesn't solve other issues like the one reported here.
sh >= 1.13.1, < 1.14 works for anyone? I still see failures...
Ok, with the uber latest sh==1.13.1 the issue is gone when using python 3.x based venv @decentral1se, but sadly still with me on 2.7.
molecule version: 2.22 (on both venvs)
@grzegorznowak Sorry to disappoint you but I have no plans to do anything about 2.22. Usually I would have closed the ticket but it does reproduce with last release and master, so is still valid.
A Python 2 fix would be nice.
Most helpful comment
A Python 2 fix would be nice.