diff options
author | Harald Musum <musum@yahooinc.com> | 2021-09-29 08:14:24 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2021-09-29 08:14:24 +0200 |
commit | e4d624b7df38999df29bd1b6c4a770f766d89578 (patch) | |
tree | 76bb998d1202a96540d85d414621ae5c2cbbd36d /configserver | |
parent | 12a415efca5749433fd22424592ddc18f04160f6 (diff) |
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.java | 5 | ||||
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationApiHandler.java | 4 |
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() |