kudulab/dojo

Panic: runtime error with docker-compose

rosienhs opened this issue · 1 comments

Hi, I'm on Mac using Colima and docker-compose binary instead of docker desktop. When running Dojo I get the following panic runtime error:

2022/01/25 11:28:09 [ 1]  INFO: (main.main) Dojo version 0.6.3
2022/01/25 11:28:09 [33]  INFO: (main.DockerComposeDriver.HandleRun) docker-compose run command will be:
 docker-compose -f docker-compose.yaml -f docker-compose.yaml.dojo -p dojo-prm-repo-suspension-service-2022-01-25_11-28-09-72983966 run --rm default "./tasks _test_integration"
panic: runtime error: slice bounds out of range

goroutine 49 [running]:
main.DockerComposeDriver.getDCContainersNames(0x11329a0, 0xc0000ee060, 0x1133360, 0xc000052180, 0xc000052180, 0xc000102180, 0x110d2a5, 0x3, 0x7ffeefbff9e0, 0xe, ...)
        /dojo/work/src/dojo/docker_compose_driver.go:546 +0x801
main.DockerComposeDriver.waitForContainersToBeRunning(0x11329a0, 0xc0000ee060, 0x1133360, 0xc000052180, 0xc000052180, 0xc000102180, 0x110d2a5, 0x3, 0x7ffeefbff9e0, 0xe, ...)
        /dojo/work/src/dojo/docker_compose_driver.go:236 +0x170
main.DockerComposeDriver.watchContainers(0x11329a0, 0xc0000ee060, 0x1133360, 0xc000052180, 0xc000052180, 0xc000102180, 0x110d2a5, 0x3, 0x7ffeefbff9e0, 0xe, ...)
        /dojo/work/src/dojo/docker_compose_driver.go:269 +0x1d6
created by main.DockerComposeDriver.HandleRun
        /dojo/work/src/dojo/docker_compose_driver.go:344 +0x63f
xmik commented

Hi @rosienhs,

Thanks for catching this! We want Dojo to support running on Mac using Colima. Please try Dojo 0.10.5 - this issue should be fixed there :) Please reopen this issue if there are still problems

Details

Reproduction

The issue can be reproduced using Dojo 0.10.3 by running

dojo --driver=docker-compose --dcf=./test/test-files/itest-dc.yaml --debug=true --test=true --image=alpine:3.8 whoami

on Mac, using Colima.

Fix

The fix was done in this commit: 26dbb44 and released as Dojo 0.10.4 (so it should be fixed for versions 0.10.4 onwards).