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

Provide clearer feedback when a hook's "exec" or "exec-host" task fails #1765

Closed
greggles opened this issue Aug 4, 2019 · 5 comments
Closed
Labels
Prioritized We expect to do this in an upcoming release

Comments

@greggles
Copy link
Contributor

greggles commented Aug 4, 2019

Is your feature request related to a problem? Please describe.
When a hook runs and the command it's running fails the output can be pretty disorienting. It made me wonder if ddev was broken somehow.

Describe the solution you'd like
It would be nice if the output showing errors could also suggest to the user something like "Try commenting out the hook and rerunning the command with ddev exec." When it fails in ddev exec it could also be good to say "Try running with ddev ssh."

Describe alternatives you've considered
It could also be good to truncate the output and say "Some of the output is shown here. Rerun the command using ddev exec to view all the error output."

Additional context
1__fish__Users_gknaddison_Sites_devdesktop_datacommons-prod__fish_

https://gist.github.com/greggles/77865f1ef2da06cf05fd0b8aec3b1c42

@greggles
Copy link
Contributor Author

greggles commented Aug 4, 2019

I've seen similar feedback at the end of other command tools like brew or maybe npm/yarn/gulp. It would say something like "There was a problem running the command. Read the error messages from earlier in the report. This is not an error with brew." Or something.

@rfay
Copy link
Member

rfay commented Aug 4, 2019

Thanks for the good report. The next time you run across a better style of reporting, could you capture it in a screenshot and put it here? Hopefully it will be long since fixed by then, but well, things aren't always ;)

@rfay rfay added the Prioritized We expect to do this in an upcoming release label Sep 16, 2019
@greggles
Copy link
Contributor Author

greggles commented Oct 1, 2019

This react and babel issue gives an example of some of the potential language you could use when a hook has exited with a nonzero status code.

There might be a problem with the hook running the command: 

    {command that failed without any output}

It is likely not a bug in DDEV, but something you need to fix in running that command.
You could try commenting out that line in your .ddev/config.yaml to see if the error goes away. 
You should try running the command manually.

@rfay
Copy link
Member

rfay commented Oct 1, 2019

Thanks!

@rfay rfay changed the title Provide clearer feedback when an ddev exec command fails Provide clearer feedback when a hook's "exec" or "exec-host" task fails Oct 2, 2019
rfay added a commit to rfay/ddev that referenced this issue Oct 2, 2019
* Show output of hook task whether or not it fails (ddev#1818)
* Don't show a bunch of docker-compose nonsense
* Add a warning explaining that this is configuration that failed (ddev#1765)
* Allow interactive commands in hook
@rfay
Copy link
Member

rfay commented Oct 5, 2019

@greggles would love to see what you think of the PR in #1860, artifacts are listed at #1860 (comment)

rfay added a commit to rfay/ddev that referenced this issue Oct 9, 2019
* Show output of hook task whether or not it fails (ddev#1818)
* Don't show a bunch of docker-compose nonsense
* Add a warning explaining that this is configuration that failed (ddev#1765)
* Allow interactive commands in hook
rfay added a commit to rfay/ddev that referenced this issue Oct 14, 2019
* Show output of hook task whether or not it fails (ddev#1818)
* Don't show a bunch of docker-compose nonsense
* Add a warning explaining that this is configuration that failed (ddev#1765)
* Allow interactive commands in hook
rfay added a commit to rfay/ddev that referenced this issue Oct 19, 2019
* Show output of hook task whether or not it fails (ddev#1818)
* Don't show a bunch of docker-compose nonsense
* Add a warning explaining that this is configuration that failed (ddev#1765)
* Allow interactive commands in hook
@rfay rfay closed this as completed in c9b948a Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prioritized We expect to do this in an upcoming release
Projects
None yet
Development

No branches or pull requests

2 participants