Skip to content

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

Merged
rfay merged 2 commits into
ddev:masterfrom
rfay:20191002_improve_exec_fail
Oct 19, 2019
Merged

Improve exec hook output/behavior, fixes #1818, fixes #1765#1860
rfay merged 2 commits into
ddev:masterfrom
rfay:20191002_improve_exec_fail

Conversation

@rfay

@rfay rfay commented Oct 2, 2019

Copy link
Copy Markdown
Member

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

rfay commented Oct 5, 2019

Copy link
Copy Markdown
Member Author

@greggles

greggles commented Oct 5, 2019

Copy link
Copy Markdown
Contributor

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
rfay added 2 commits October 19, 2019 15:40
* 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

rfay commented Oct 19, 2019

Copy link
Copy Markdown
Member Author

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.

2 participants