palantir/docker-compose-rule

`Retryer` should wait a few seconds before trying again

Closed this issue · 0 comments

Especially if there is a network blip, there is no point in retrying 3 times in quick succession. Backing off for 10 seconds seems perfectly reasonable if it might prevent the failure of a 10 minute build!

com.palantir.docker.compose.execution.DockerExecutionException: 'docker-compose up -d' returned exit code 1
The output was:
Pulling db (postgres:latest)...
Pulling repository docker.io/library/postgres
Error while pulling image: Get https://index.docker.io/v1/repositories/library/postgres/images: dial tcp: lookup index.docker.io on 172.16.25.1:53: dial udp 172.16.25.1:53: connect: network is unreachable
    at com.palantir.docker.compose.execution.Command.lambda$throwingOnError$17(Command.java:59)
    at com.palantir.docker.compose.execution.Command$$Lambda$34/344008800.handle(Unknown Source)
    at com.palantir.docker.compose.execution.Command.execute(Command.java:49)
    at com.palantir.docker.compose.execution.DefaultDockerCompose.up(DefaultDockerCompose.java:70)
    at com.palantir.docker.compose.execution.DelegatingDockerCompose.up(DelegatingDockerCompose.java:39)
    at com.palantir.docker.compose.execution.RetryingDockerCompose.lambda$up$31(RetryingDockerCompose.java:36)
    at com.palantir.docker.compose.execution.RetryingDockerCompose$$Lambda$46/1139413690.call(Unknown Source)
    at com.palantir.docker.compose.execution.Retryer.runWithRetries(Retryer.java:39)
    at com.palantir.docker.compose.execution.RetryingDockerCompose.up(RetryingDockerCompose.java:35)
    at com.palantir.docker.compose.execution.ConflictingContainerRemovingDockerCompose.up(ConflictingContainerRemovingDockerCompose.java:51)
    at com.palantir.docker.compose.DockerComposeRule.before(DockerComposeRule.java:130)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)