From 7a0b18d3f2685301d2f07919ffc9b396be4de12e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 14:27:05 +0000 Subject: [PATCH] fix(deployment): fixed missing namespace while fetching manifest details from clouddriver (#4453) (#4457) (cherry picked from commit 435a5c323d20fbf3b9e3f6cb1514755d1212fa02) Co-authored-by: Krzysztof Kotula --- .../clouddriver/pipeline/manifest/DeployManifestStage.java | 6 +++--- .../pipeline/manifest/DeployManifestStageTest.java | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java b/orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java index 20f585dd50..93476c3b9a 100644 --- a/orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java +++ b/orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStage.java @@ -158,7 +158,7 @@ private void deleteOrDisableOldManifest( (name, manifest) -> { var oldManifestIsUnstable = this.manifestOperationsHelper.previousDeploymentNeitherStableNorFailed( - manifest.getAccount(), name); + manifest.getAccount(), manifest.getNamespace(), name); var nextStageType = oldManifestIsUnstable ? DeleteManifestStage.PIPELINE_CONFIG_TYPE @@ -254,8 +254,8 @@ ImmutableList getOldManifestNames(DeployedManifest dm) { * @param name of the manifest * @return true, if manifest was not deployed correctly and waits to get stable, false otherwise */ - boolean previousDeploymentNeitherStableNorFailed(String account, String name) { - var oldManifest = this.oortService.getManifest(account, name, false); + boolean previousDeploymentNeitherStableNorFailed(String account, String location, String name) { + var oldManifest = this.oortService.getManifest(account, location, name, false); var status = oldManifest.getStatus(); var notStable = !status.getStable().isState(); diff --git a/orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java b/orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java index 1ba5a3c52d..b3e98c2ee6 100644 --- a/orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java +++ b/orca-clouddriver/src/test/java/com/netflix/spinnaker/orca/clouddriver/pipeline/manifest/DeployManifestStageTest.java @@ -401,6 +401,7 @@ private void givenManifestIsNotStable() { } private void givenManifestIs(Manifest manifest) { - when(oortService.getManifest(anyString(), anyString(), anyBoolean())).thenReturn(manifest); + when(oortService.getManifest(anyString(), anyString(), anyString(), anyBoolean())) + .thenReturn(manifest); } }