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

Don't fail git clone is tty is not attached #586

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

dliappis
Copy link
Contributor

Switch to run_subprocess_with_logging to provide some logs on
failures when executing git clone and not rely on an attached
tty (in case the daemon's been restarted with some automation in a
non-interactive shell).

@dliappis dliappis added the bug Something's wrong label Oct 18, 2018
@danielmitterdorfer danielmitterdorfer added this to the 1.0.2 milestone Oct 18, 2018
Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I left one comment on a test.

run_subprocess.return_value = False
@mock.patch("esrally.utils.process.run_subprocess_with_logging")
def test_clone_successful(self, run_subprocess_with_logging, ensure_dir):
run_subprocess_with_logging.return_value = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we actually set the return code instead of returning a boolean?

Suggested change
run_subprocess_with_logging.return_value = False
run_subprocess_with_logging.return_value = 0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, 0 should be the right value here. Will fix, thanks.

Switch to `run_subprocess_with_logging` to provide some logs on
failures when executing `git clone` and not rely on an attached
tty (in case the daemon's been restarted with some automation in a
non-interactive shell).
@dliappis dliappis merged commit 356bcf9 into elastic:master Oct 18, 2018
@dliappis dliappis deleted the clone_with_logging branch October 18, 2018 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants