summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2021-09-29 08:42:08 +0200
committerGitHub <noreply@github.com>2021-09-29 08:42:08 +0200
commitcceb14d403142e8d5adeb3cacb100bf575f0af71 (patch)
treed4cafc28878a75df4c19045ce07acad48307b3e0 /configserver
parent51b8731c3e740257ae2a2e63f2d212e4fa30164f (diff)
parente4d624b7df38999df29bd1b6c4a770f766d89578 (diff)
Merge pull request #19341 from vespa-engine/hmusum/do-not-activate-when-deploying-with-dryrun
Do not activate application when this is a dry run
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java5
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java4
2 files changed, 5 insertions, 4 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
index 1eb27a3224a..fac5be432b3 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
@@ -1,4 +1,4 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server;
import com.google.inject.Inject;
@@ -350,7 +350,8 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
long sessionId = createSession(applicationId, prepareParams.getTimeoutBudget(), applicationPackage);
Deployment deployment = prepare(sessionId, prepareParams, logger);
- deployment.activate();
+ if ( ! prepareParams.isDryRun())
+ deployment.activate();
return new PrepareResult(sessionId, deployment.configChangeActions(), logger);
}
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java
index 7e8940d28b3..1a8b36ee19f 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java
@@ -1,4 +1,4 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server.http.v2;
import com.google.inject.Inject;
@@ -75,7 +75,7 @@ public class ApplicationApiHandler extends SessionHandler {
.map(ContentType::parse)
.map(contentType -> contentType.getMimeType().equalsIgnoreCase(MULTIPART_FORM_DATA))
.orElse(false);
- if(multipartRequest) {
+ if (multipartRequest) {
try {
MultiPartFormInputStream multiPartFormInputStream = new MultiPartFormInputStream(request.getData(), request.getHeader(CONTENT_TYPE), /* config */null, /* contextTmpDir */null);
Map<String, Part> parts = multiPartFormInputStream.getParts().stream()