diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d238da22..b50a8e3a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1253,9 +1253,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", diff --git a/rust/src/application/client.rs b/rust/src/application/client.rs index 137cda9b..b3ef55ff 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 e84515aa..2fdedf0a 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 835a7813..341f9ea5 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