aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-12-05 15:07:43 +0100
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-12-05 15:07:43 +0100
commit1e4d2caeaf0e7ec96b77e180d38ed9a9c164ca65 (patch)
treeeaf8e0a1821f2ede740119652e062c5b5ebff3ac /controller-server
parente4ef7cd3aea8c2082d93ac00b1552de35e1012c5 (diff)
Allow fake reports for new pipeline as well
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java5
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
index 2c5bbef1e70..aa0d4857818 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
@@ -917,9 +917,10 @@ public class ApplicationApiHandler extends LoggingRequestHandler {
private HttpResponse notifyJobCompletion(String tenant, String application, HttpRequest request) {
try {
DeploymentJobs.JobReport report = toJobReport(tenant, application, toSlime(request.getData()).get());
- if (controller.applications().require(report.applicationId()).deploymentJobs().deployedInternally())
+ if ( report.jobType() == JobType.component
+ && controller.applications().require(report.applicationId()).deploymentJobs().deployedInternally())
throw new IllegalArgumentException(report.applicationId() + " is set up to be deployed from internally, and no " +
- "longer accepts reports from Screwdriver v3 jobs. If you need to revert " +
+ "longer accepts submissions from Screwdriver v3 jobs. If you need to revert " +
"to the old pipeline, please file a ticket at yo/vespa-support and request this.");
controller.applications().deploymentTrigger().notifyOfCompletion(report);
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
index e65e0b62e1b..1ce4d37811e 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
@@ -448,7 +448,7 @@ public class ApplicationApiTest extends ControllerContainerTest {
Optional.of(BuildJob.defaultSourceRevision),
Optional.empty()))),
"{\"error-code\":\"BAD_REQUEST\",\"message\":\"" + app1 + " is set up to be deployed from internally," +
- " and no longer accepts reports from Screwdriver v3 jobs. If you need to revert " +
+ " and no longer accepts submissions from Screwdriver v3 jobs. If you need to revert " +
"to the old pipeline, please file a ticket at yo/vespa-support and request this.\"}",
400);