From d10d2b7f58bc6038a7ee369021bb50590f6d597b Mon Sep 17 00:00:00 2001 From: "Sanket M." Date: Tue, 18 Aug 2026 15:47:07 +0530 Subject: [PATCH 1/2] fix(platform): remove direct application status updates --- rust/src/application/client.rs | 11 ++--- rust/src/application/commands/deploy/mod.rs | 19 ++------- rust/src/application/commands/info.rs | 11 +---- rust/src/application/commands/update.rs | 45 +++++---------------- 4 files changed, 21 insertions(+), 65 deletions(-) diff --git a/rust/src/application/client.rs b/rust/src/application/client.rs index 137cda9..b3ef55f 100644 --- a/rust/src/application/client.rs +++ b/rust/src/application/client.rs @@ -515,7 +515,7 @@ mod tests { } #[tokio::test] - async fn update_application_promotes_to_active() { + async fn update_application_sends_non_lifecycle_fields() { let server = MockServer::start_async().await; let mock = server .mock_async(|when, then| { @@ -523,21 +523,22 @@ mod tests { .path("/v1/apps/app-registry-subgraph") .is_true(|req| { let body = req.body_string(); - body.contains("updateApplication") && body.contains(r#""status":"ACTIVE""#) + body.contains("updateApplication") + && body.contains(r#""label":"Updated app""#) }); then.status(200).json_body(json!({ - "data": { "updateApplication": { "id": "app-1", "status": "ACTIVE" } } + "data": { "updateApplication": { "id": "app-1", "label": "Updated app" } } })); }) .await; let data = ApplicationClient::new(server.base_url(), "test-token") - .update_application("app-1", json!({ "status": "ACTIVE" })) + .update_application("app-1", json!({ "label": "Updated app" })) .await .expect("update application"); mock.assert_async().await; - assert_eq!(data["updateApplication"]["status"], "ACTIVE"); + assert_eq!(data["updateApplication"]["label"], "Updated app"); } // httpmock can't sequence responses, so retries are verified by hit count diff --git a/rust/src/application/commands/deploy/mod.rs b/rust/src/application/commands/deploy/mod.rs index e84515a..2fdedf0 100644 --- a/rust/src/application/commands/deploy/mod.rs +++ b/rust/src/application/commands/deploy/mod.rs @@ -83,7 +83,7 @@ fn deploy_result_event( "applicationId": application_id, "releaseId": release_id, "extensions": extensions, - "status": "ACTIVE", + "releaseStatus": "ACTIVE", }, "next_actions": deploy_next_actions(name), }) @@ -254,8 +254,8 @@ pub(super) fn command() -> RuntimeCommandSpec { ) } -/// Finalize a deploy: activate the release, then promote the application to -/// `ACTIVE`. Deploy must activate the release before promoting the application. +/// Finalize a deploy by activating the release. Do not follow activation with +/// an `updateApplication` status mutation. async fn finalize_deploy_activation( client: &ApplicationClient, sender: &StreamSender, @@ -272,17 +272,6 @@ async fn finalize_deploy_activation( sender .send(json!({ "type": "step", "name": "release.activate", "status": "completed" })) .await; - sender - .send(json!({ "type": "step", "name": "application.activate", "status": "started" })) - .await; - client - .update_application(application_id, json!({ "status": "ACTIVE" })) - .await - .map_err(super::client_err)?; - sender - .send(json!({ "type": "step", "name": "application.activate", "status": "completed" })) - .await; - Ok(()) } @@ -375,7 +364,7 @@ mod tests { assert_eq!(event["result"]["applicationId"], "app-123"); assert_eq!(event["result"]["releaseId"], "rel-456"); assert_eq!(event["result"]["extensions"], 2); - assert_eq!(event["result"]["status"], "ACTIVE"); + assert_eq!(event["result"]["releaseStatus"], "ACTIVE"); assert_eq!( event["next_actions"].as_array().map(|a| a.len()), Some(3), diff --git a/rust/src/application/commands/info.rs b/rust/src/application/commands/info.rs index 835a781..341f9ea 100644 --- a/rust/src/application/commands/info.rs +++ b/rust/src/application/commands/info.rs @@ -45,17 +45,10 @@ pub(super) fn command() -> RuntimeCommandSpec { ) .with_param("name", required_value(&name)), next_action( - "platform app update --id [--label