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

Broken dependency from pip's sh module #2676

Closed
grzegorznowak opened this issue Apr 28, 2020 · 8 comments · Fixed by #2679
Closed

Broken dependency from pip's sh module #2676

grzegorznowak opened this issue Apr 28, 2020 · 8 comments · Fixed by #2679
Assignees
Labels
bug packaging installation, packaging, built containers
Milestone

Comments

@grzegorznowak
Copy link

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.

Issue Type

  • Bug report

Molecule and Ansible details

molecule==2.22
ansible==2.9.0

Molecule installation method: pip

Ansible installation method (one of): pip

Desired Behavior

molecule provisioning ran OK

Actual Behaviour

  '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).

@apatard
Copy link
Contributor

apatard commented Apr 28, 2020

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.

@decentral1se
Copy link
Contributor

Yep, broke my plugin test suite...

Let's add a bound for now as a quick fix and then work to adapt to changes?

decentral1se added a commit to decentral1se/molecule that referenced this issue Apr 28, 2020
@decentral1se
Copy link
Contributor

This might merit a new quick release to unbreak the world...

@apatard
Copy link
Contributor

apatard commented Apr 28, 2020

New version of sh.py added checks on the environment arguments, since commit amoffat/sh@5b27477.

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.

decentral1se added a commit to decentral1se/molecule that referenced this issue Apr 28, 2020
decentral1se added a commit to decentral1se/molecule that referenced this issue Apr 28, 2020
@decentral1se
Copy link
Contributor

decentral1se commented Apr 28, 2020

sh >= 1.13.1, < 1.14 works for anyone? I still see failures...

@grzegorznowak
Copy link
Author

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)

@ssbarnea
Copy link
Member

@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.

@ssbarnea ssbarnea self-assigned this Apr 28, 2020
@ssbarnea ssbarnea added this to the 3.0.4 milestone Apr 28, 2020
@ssbarnea ssbarnea added the packaging installation, packaging, built containers label Apr 28, 2020
@markgoddard
Copy link

A Python 2 fix would be nice.

openstack-gerrit pushed a commit to openstack/kayobe that referenced this issue Apr 29, 2020
The kayobe-tox-molecule job is currently failing on stable/train and
earlier branches. This was caused by the 13.0 release of the 'sh'
package [1]. A 13.1 release fixed this for Python 3, but there is no fix
available for Python 2 currently.

This change works around the issue by pinning 'sh' to <13.0 in
test-requirements.txt.

[1] ansible/molecule#2676

Change-Id: I0df1dadb3b48736cdbd25112517e524533550210
openstack-gerrit pushed a commit to openstack/kayobe that referenced this issue Apr 29, 2020
The kayobe-tox-molecule job is currently failing on stable/train and
earlier branches. This was caused by the 13.0 release of the 'sh'
package [1]. A 13.1 release fixed this for Python 3, but there is no fix
available for Python 2 currently.

This change works around the issue by pinning 'sh' to <13.0 in
test-requirements.txt.

[1] ansible/molecule#2676

Change-Id: I0df1dadb3b48736cdbd25112517e524533550210
(cherry picked from commit 5f83651)
openstack-gerrit pushed a commit to openstack/kayobe that referenced this issue Apr 29, 2020
The kayobe-tox-molecule job is currently failing on stable/train and
earlier branches. This was caused by the 13.0 release of the 'sh'
package [1]. A 13.1 release fixed this for Python 3, but there is no fix
available for Python 2 currently.

This change works around the issue by pinning 'sh' to <13.0 in
test-requirements.txt.

[1] ansible/molecule#2676

Change-Id: I0df1dadb3b48736cdbd25112517e524533550210
(cherry picked from commit 5f83651)
openstack-gerrit pushed a commit to openstack/kayobe that referenced this issue Apr 29, 2020
The kayobe-tox-molecule job is currently failing on stable/train and
earlier branches. This was caused by the 13.0 release of the 'sh'
package [1]. A 13.1 release fixed this for Python 3, but there is no fix
available for Python 2 currently.

This change works around the issue by pinning 'sh' to <13.0 in
test-requirements.txt.

[1] ansible/molecule#2676

Change-Id: I0df1dadb3b48736cdbd25112517e524533550210
(cherry picked from commit 5f83651)
openstack-gerrit pushed a commit to openstack-archive/tripleo-ansible that referenced this issue May 1, 2020
This pin works for python2 and python3 environments
and resolves:

ansible/molecule#2676

We unfortunately have molecule pinned, so we won't
inherit any fixes (including this one) from newer
releases.

Change-Id: I0548b0a20abbc8a0c0ac3c7d88c93c0180a87a77
rhysmeister added a commit to ansible-collections/community.mongodb that referenced this issue May 3, 2020
openstack-gerrit pushed a commit to openstack-archive/tripleo-upgrade that referenced this issue May 4, 2020
This pin works for python2 and python3 environments
and resolves:

ansible/molecule#2676

We unfortunately have molecule pinned, so we won't
inherit any fixes (including this one) from newer
releases.

Change-Id: Ia29419966efcadb1c996f7f5785354698ecc80c3
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue May 4, 2020
* Update tripleo-upgrade from branch 'master'
  - Merge "Pin sh library used for molecule tests"
  - Pin sh library used for molecule tests
    
    This pin works for python2 and python3 environments
    and resolves:
    
    ansible/molecule#2676
    
    We unfortunately have molecule pinned, so we won't
    inherit any fixes (including this one) from newer
    releases.
    
    Change-Id: Ia29419966efcadb1c996f7f5785354698ecc80c3
openstack-gerrit pushed a commit to openstack-archive/tripleo-upgrade that referenced this issue May 4, 2020
This pin works for python2 and python3 environments
and resolves:

ansible/molecule#2676

We unfortunately have molecule pinned, so we won't
inherit any fixes (including this one) from newer
releases.

Change-Id: Ia29419966efcadb1c996f7f5785354698ecc80c3
(cherry picked from commit 3c47a46)
rhysmeister added a commit to ansible-collections/community.mongodb that referenced this issue May 21, 2020
* Add directory create

* Add .local to config servers var

* Update sh version for ansible/molecule#2676

* Update readme

* Fix for python 2.7

* Remove local domain

* Add auth to mongos

* keyfile after user/group create

* Remove authorization param

* Change auth default

* Update vars

* Add exception handling to tests

* Add username/pw to tests

* Updates to create user

* Update readme and prepare for vb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug packaging installation, packaging, built containers
Projects
None yet
5 participants