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

Issue with baked commands in 1.12.5 #340

Closed
javierpena opened this issue Dec 1, 2016 · 5 comments
Closed

Issue with baked commands in 1.12.5 #340

javierpena opened this issue Dec 1, 2016 · 5 comments

Comments

@javierpena
Copy link

Hi,

We're having an issue with sh 1.12.5 when using baked commands. The following code works fine with 1.11.0 and 1.12.0:

import sh

url="https://github.com/openstack/puppet-nova"
path="/tmp/nova"
branch="master"

print("Starting clone %s to %s" % (url, path))
sh.git.clone(url, path)
print("Cloned %s to %s" % (url, path))

git = sh.git.bake(_cwd=path, _tty_out=False, _timeout=3600)
try:
    print("Fetching origin")
    git.fetch("origin")
    print("Fetched origin")
except Exception:
    print("Error fetching into %s, deleting." % (path))

However, with 1.12.5 it never comes back from git.fetch("origin"). I see the git process has finished, but the Python call never returns.

@javierpena
Copy link
Author

I've run some more tests. It worked fine in 1.12.3, and started breaking in 1.12.4

@amoffat
Copy link
Owner

amoffat commented Dec 1, 2016

Confirmed. Thanks for reporting. I did some minor refactoring in 1.12.4, and apparently the tests did not catch this regression. Looking into it now.

@amoffat
Copy link
Owner

amoffat commented Dec 1, 2016

Temporary workaround seems to be to remove the timeout.

@amoffat
Copy link
Owner

amoffat commented Dec 2, 2016

dup of #344, closing

@amoffat
Copy link
Owner

amoffat commented Dec 2, 2016

the issue is fixed on the latest release, 1.12.6

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