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

Improve exec hook output/behavior, fixes #1818, fixes #1765 #1860

Merged
merged 2 commits into from Oct 19, 2019

Conversation

rfay
Copy link
Member

@rfay rfay commented Oct 2, 2019

The Problem/Issue/Bug:

#1818 points out that there are cases where an exec task fails and no output is provided
#1765 requests clearer feedback about the problem when an exec task fails, instead of giving a bunch of docker-compose gobbledygook.

How this PR Solves The Problem:

Manual Testing Instructions:

Try this in your config.yaml:

hooks:
 pre-start:
   - exec-host:  ls junker100
 post-start:
   - exec: ls junker99

and do a ddev start

  • The pre-start hook should fail with appropriate information
  • The post-start ls junker99 should fail with appropriate information

rfay_d8composer-web___var_www_html_web__bash__and_rfay_rfay-drupal8-web___var_www_html__bash_

Automated Testing Overview:

No new testing is added here.

Related Issue Link(s):

#1818
#1765

Release/Deployment notes:

Add to release notes:

  • Failure of hook task doesn't cause failure of start (or anything else)

@rfay
Copy link
Member Author

rfay commented Oct 5, 2019

@greggles
Copy link
Contributor

greggles commented Oct 5, 2019

This is a very nice improvement!

@rfay rfay force-pushed the 20191002_improve_exec_fail branch 2 times, most recently from e626744 to 9c4770b Compare October 14, 2019 20:55
* 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 force-pushed the 20191002_improve_exec_fail branch from 9c4770b to fdaedde Compare October 19, 2019 13:56
@rfay
Copy link
Member Author

rfay commented Oct 19, 2019

Rebased and retested; I think this is ready to go when tests pass.

@rfay rfay merged commit c9b948a into ddev:master Oct 19, 2019
@rfay rfay deleted the 20191002_improve_exec_fail branch October 19, 2019 21:11
@rfay rfay mentioned this pull request Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants