In order to provide better failure cause determination and reporting, and to be able to bail early when commands executed on the container fail, take advantage of the new execinspect() method in docker-php to get the return code of any ContainerCommand commands which have been executed, and act upon any non-zero return codes.

CommentFileSizeAuthor
#3 Use_execinspect.patch933 bytesjthorson

Comments

jthorson created an issue. See original summary.

jthorson’s picture

Assigned: Unassigned » jthorson
jthorson’s picture

Status: Active » Needs review
StatusFileSize
new933 bytes

Included in the branch for #2484119: Create a 'syntax linting' build step plugin, as it was a 6 line issue and prerequisite to complete that task.

jthorson’s picture

Issue tags: +Barcelona2015
isntall’s picture

Is $inspection->ExitCode correct or should it be $inspection->getExitCode()?

jthorson’s picture

The execinspect() call within docker php returns us a json decoded object, so we need to access the property directly ... there are no helper methods.

From https://github.com/stage1/docker-php/blob/master/src/Docker/Manager/Cont...

return json_decode((string) $response->getBody());

  • basic committed 3d975cf on 2571329-Leverage-execinspect-to-obtain-ContainerCommand-return-codes
    Issue #2571329 by jthorson: Leverage execinspect to obtain...
basic’s picture

Status: Needs review » Reviewed & tested by the community

I've created a feature branch and merged the changes to the dev branch.

Mixologic’s picture

Issue tags: +Needs deployment
isntall’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs deployment

dev has been merged into production, and production is live.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.