From 0595f33fe948ee6df3da492567e3e7943cb9a733 Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Wed, 16 Oct 2024 19:31:12 -0700 Subject: [PATCH] fix persistSettings regression (#4450) * Fixing regression for persistSettings() which is trying to read values after an error. * comment * cl --- cli/azd/CHANGELOG.md | 8 ++------ cli/azd/pkg/containerapps/container_app.go | 3 +++ cli/version.txt | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cli/azd/CHANGELOG.md b/cli/azd/CHANGELOG.md index bcc6eb60143..e0f7c334361 100644 --- a/cli/azd/CHANGELOG.md +++ b/cli/azd/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.11.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.10.3 (2024-10-16) ### Bugs Fixed -### Other Changes +- [[4450]](https://github.com/Azure/azure-dev/pull/4450) fix `persistSettings` alpha feature. ## 1.10.2 (2024-10-08) diff --git a/cli/azd/pkg/containerapps/container_app.go b/cli/azd/pkg/containerapps/container_app.go index 8edd230b8cc..5303a408de6 100644 --- a/cli/azd/pkg/containerapps/container_app.go +++ b/cli/azd/pkg/containerapps/container_app.go @@ -146,6 +146,9 @@ func (cas *containerAppService) persistSettings( aca, err := cas.getContainerApp(ctx, subscriptionId, resourceGroupName, appName, options) if err != nil { log.Printf("failed getting current aca settings: %v. No settings will be persisted.", err) + // if the container app doesn't exist, there's nothing for us to update in the desired state, + // so we can just return the existing state as is. + return obj, nil } objConfig := config.NewConfig(obj) diff --git a/cli/version.txt b/cli/version.txt index 3d7793563cc..587c5f0c730 100644 --- a/cli/version.txt +++ b/cli/version.txt @@ -1 +1 @@ -1.11.0-beta.1 +1.10.3