summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-04-13 10:58:14 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-04-13 12:08:10 +0200
commit5163c7ddde2f98866e6b922f6d514e4cbf137e2c (patch)
tree889bd6a9fb392c585b42c8e98ee105b969947732 /controller-api
parenta4073d0e1f5078cdeebd2c1f23134da20ca62dec (diff)
BuildService.isRunning and remove faulty data on exceptions
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java8
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java17
2 files changed, 4 insertions, 21 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java
index e32ad47b180..d853443bf5d 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java
@@ -9,11 +9,11 @@ import java.util.Objects;
public interface BuildService {
/**
- * Enqueues a job defined by buildJob in an external build system, and returns the outcome of the enqueue request.
- * This method should return false only when a retry is in order, and true otherwise, e.g., on success, or for
- * invalid jobs.
+ * Enqueues a job defined by buildJob in an external build system.
+ *
+ * Implementations should throw an exception if the triggering fails.
*/
- boolean trigger(BuildJob buildJob);
+ void trigger(BuildJob buildJob);
/**
* Returns whether the given job is currently running.
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java
deleted file mode 100644
index a75236e6f67..00000000000
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.yahoo.vespa.hosted.controller.api.integration.stubs;
-
-import com.yahoo.vespa.hosted.controller.api.integration.BuildService;
-
-public class MockBuildService implements BuildService {
-
- @Override
- public boolean trigger(BuildJob buildJob) {
- return true;
- }
-
- @Override
- public boolean isRunning(BuildJob buildJob) {
- return false;
- }
-
-}