diff options
3 files changed, 12 insertions, 8 deletions
diff --git a/bundle-plugin/src/main/resources/META-INF/plexus/components.xml b/bundle-plugin/src/main/resources/META-INF/plexus/components.xml index 31e21eb18fd..f305d02c4ae 100644 --- a/bundle-plugin/src/main/resources/META-INF/plexus/components.xml +++ b/bundle-plugin/src/main/resources/META-INF/plexus/components.xml @@ -16,8 +16,7 @@ <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile> <process-test-resources> - org.apache.maven.plugins:maven-resources-plugin:testResources, - com.yahoo.vespa:bundle-plugin:generate-bundle-classpath-mappings + org.apache.maven.plugins:maven-resources-plugin:testResources </process-test-resources> <test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> <test>org.apache.maven.plugins:maven-surefire-plugin:test</test> diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java index 47478d14c33..3b6a03a76c9 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java @@ -66,7 +66,6 @@ import java.time.Instant; import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -88,7 +87,6 @@ import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.error; import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.installationFailed; import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.outOfCapacity; import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.running; -import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.success; import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.testFailure; import static com.yahoo.vespa.hosted.controller.deployment.Step.Status.succeeded; import static com.yahoo.vespa.hosted.controller.deployment.Step.copyVespaLogs; @@ -98,6 +96,7 @@ import static com.yahoo.vespa.hosted.controller.deployment.Step.deployInitialRea import static com.yahoo.vespa.hosted.controller.deployment.Step.deployReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployTester; import static com.yahoo.vespa.hosted.controller.deployment.Step.installTester; +import static com.yahoo.vespa.hosted.controller.deployment.Step.report; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.logging.Level.INFO; @@ -710,6 +709,12 @@ public class InternalStepRunner implements StepRunner { logger.log(INFO, "Job '" + id.type() + "' no longer supposed to run?", e); return Optional.of(error); } + catch (RuntimeException e) { + Instant start = controller.jobController().run(id).get().stepInfo(report).get().startTime().get(); + return (controller.clock().instant().isAfter(start.plusSeconds(180))) + ? Optional.empty() + : Optional.of(error); + } return Optional.of(running); } diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentUpgraderTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentUpgraderTest.java index 552a38e6678..7a8f775e8b1 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentUpgraderTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentUpgraderTest.java @@ -63,19 +63,19 @@ public class DeploymentUpgraderTest { assertEquals(start, tester.jobs().last(devApp.instanceId(), devUsEast1).get().start()); assertEquals(start, tester.jobs().last(prodApp.instanceId(), productionUsWest1).get().start()); - // 13 hours pass, but not upgraded before a day has passed since last deployment - tester.clock().advance(Duration.ofHours(13)); + // 14 hours pass, but not upgraded before a day has passed since last deployment + tester.clock().advance(Duration.ofHours(14)); upgrader.maintain(); assertEquals(start, tester.jobs().last(devApp.instanceId(), devUsEast1).get().start()); assertEquals(start, tester.jobs().last(prodApp.instanceId(), productionUsWest1).get().start()); - // 34 hours pass, but not upgraded since it's not likely in the middle of the night + // 35 hours pass, but not upgraded since it's not likely in the middle of the night tester.clock().advance(Duration.ofHours(21)); upgrader.maintain(); assertEquals(start, tester.jobs().last(devApp.instanceId(), devUsEast1).get().start()); assertEquals(start, tester.jobs().last(prodApp.instanceId(), productionUsWest1).get().start()); - // 37 hours pass, and the dev deployment, only, is upgraded + // 38 hours pass, and the dev deployment, only, is upgraded tester.clock().advance(Duration.ofHours(3)); upgrader.maintain(); assertEquals(tester.clock().instant().truncatedTo(MILLIS), tester.jobs().last(devApp.instanceId(), devUsEast1).get().start()); |