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

Failed pushing is not user friendly #26

Closed
hroncok opened this issue Feb 23, 2017 · 3 comments
Closed

Failed pushing is not user friendly #26

hroncok opened this issue Feb 23, 2017 · 3 comments
Assignees
Labels

Comments

@hroncok
Copy link
Member

hroncok commented Feb 23, 2017

I've hidden the stderr to fix #25.

Now when the push could not happen (maybe bad token or such), this is what is in the log:

Pushing to GitHub...
Traceback (most recent call last):
  File "pyladies_cz.py", line 229, in <module>
    cli(app, freezer=freezer, base_url='http://pyladies.cz')
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/elsa/_cli.py", line 127, in cli
    return command()
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/elsa/_cli.py", line 125, in deploy
    deploy_(path, push=push)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/elsa/_deployment.py", line 56, in deploy
    quiet=True)
  File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/elsa/_deployment.py", line 22, in run
    return subprocess.run(cmd, **kwargs)
  File "/opt/python/3.5.2/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'push', 'origin', 'gh-pages:gh-pages', '--force']' returned non-zero exit status 128

That's not nice, but I wanted to fix #25 ASAP so I didn't bother.

@hroncok hroncok added the bug label Feb 23, 2017
@hroncok
Copy link
Member Author

hroncok commented Mar 21, 2017

What about this:

Pushing to GitHub...
Error: git push failed (exit status 128).
Note: Due to security constraints, Elsa does not show the error message from git, as it may include sensitive information and this could be logged. Use the --show-git-push-stderr switch to change this behavior.

@hroncok
Copy link
Member Author

hroncok commented Mar 21, 2017

Note to self: This is not the only place where Elsa tracebacks on the user (other places notably: Frozen Flask warnings treated as errors). That should not be acceptable, a decent error message to stderr and an appropriate exit status is usually much nicer.

@encukou
Copy link
Member

encukou commented Mar 22, 2017

That message looks good, except a typo: constraints

hroncok added a commit to hroncok/elsa that referenced this issue Jun 23, 2017
@hroncok hroncok self-assigned this Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants