From daa0d365280271605d9837726ee6044b7b323204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karolis=20Gudi=C5=A1kis?= Date: Mon, 25 Sep 2023 15:06:34 +0300 Subject: [PATCH 1/3] chore: Remove stop application call when deleting application Stopping application will be done on cloud side during application deletion --- dozer-cli/src/simple/cloud_orchestrator.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/dozer-cli/src/simple/cloud_orchestrator.rs b/dozer-cli/src/simple/cloud_orchestrator.rs index 008be7d408..f86bb8f270 100644 --- a/dozer-cli/src/simple/cloud_orchestrator.rs +++ b/dozer-cli/src/simple/cloud_orchestrator.rs @@ -161,9 +161,6 @@ impl CloudOrchestrator for SimpleOrchestrator { self.runtime.block_on(async move { let mut client = get_cloud_client(&cloud, cloud_config).await?; - stop_app(&mut client, &app_id).await?; - - // steps.start_next_step(); let delete_result = client .delete_application(DeleteAppRequest { app_id: app_id.clone(), From 88ef3b9a984d39d81a23497c7c81d55d7e2c186d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karolis=20Gudi=C5=A1kis?= Date: Mon, 25 Sep 2023 15:17:55 +0300 Subject: [PATCH 2/3] Remove stop app --- dozer-cli/src/simple/cloud/deployer.rs | 14 -------------- dozer-cli/src/simple/cloud_orchestrator.rs | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/dozer-cli/src/simple/cloud/deployer.rs b/dozer-cli/src/simple/cloud/deployer.rs index 32512561f2..5a2a7772d1 100644 --- a/dozer-cli/src/simple/cloud/deployer.rs +++ b/dozer-cli/src/simple/cloud/deployer.rs @@ -96,17 +96,3 @@ async fn print_progress( } Ok::<(), CloudError>(()) } - -pub async fn stop_app( - client: &mut DozerCloudClient, - app_id: &str, -) -> Result { - let result = client - .stop_dozer(StopRequest { - app_id: app_id.to_string(), - }) - .await? - .into_inner(); - - Ok(result) -} diff --git a/dozer-cli/src/simple/cloud_orchestrator.rs b/dozer-cli/src/simple/cloud_orchestrator.rs index f86bb8f270..390264aa68 100644 --- a/dozer-cli/src/simple/cloud_orchestrator.rs +++ b/dozer-cli/src/simple/cloud_orchestrator.rs @@ -9,7 +9,7 @@ use crate::errors::OrchestrationError::FailedToReadOrganisationName; use crate::errors::{ map_tonic_error, CliError, CloudError, CloudLoginError, ConfigCombineError, OrchestrationError, }; -use crate::simple::cloud::deployer::{deploy_app, stop_app}; +use crate::simple::cloud::deployer::deploy_app; use crate::simple::cloud::login::CredentialInfo; use crate::simple::cloud::monitor::monitor_app; use crate::simple::token_layer::TokenLayer; From 15c0711dccc8bc6edd6f0faaa6bbb7780de76d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karolis=20Gudi=C5=A1kis?= Date: Mon, 25 Sep 2023 15:35:01 +0300 Subject: [PATCH 3/3] Fix clippy warnings --- dozer-cli/src/simple/cloud/deployer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dozer-cli/src/simple/cloud/deployer.rs b/dozer-cli/src/simple/cloud/deployer.rs index 5a2a7772d1..1d307e3a9d 100644 --- a/dozer-cli/src/simple/cloud/deployer.rs +++ b/dozer-cli/src/simple/cloud/deployer.rs @@ -9,7 +9,7 @@ use dozer_types::grpc_types::cloud::GetDeploymentStatusRequest; use crate::cloud_app_context::CloudAppContext; use dozer_types::grpc_types::cloud::DeployAppRequest; use dozer_types::grpc_types::cloud::File; -use dozer_types::grpc_types::cloud::{Secret, StopRequest, StopResponse}; +use dozer_types::grpc_types::cloud::Secret; use dozer_types::log::{info, warn}; pub async fn deploy_app(