From 71d4a6a4d8fcbafc325d610cef108c2e7ac89600 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Wed, 6 Nov 2024 09:47:10 -0800 Subject: [PATCH] Fixed issue detecting if log parameters have changed since previous deployment. (#343) --- CHANGELOG.md | 1 + aws-extensions-for-dotnet-cli.sln | 2 +- .../Commands/UpdateFunctionConfigCommand.cs | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4862c54..d3f641a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Amazon.Lambda.Tools (5.11.1) * Fixed an issue where primitive values in payload for InvokeFunctionCommand were not working. +* Fixed issue detecting if log parameters have changed since previous deployment. ## Release 2024-10-09 diff --git a/aws-extensions-for-dotnet-cli.sln b/aws-extensions-for-dotnet-cli.sln index 58ba0fe..c3e5653 100644 --- a/aws-extensions-for-dotnet-cli.sln +++ b/aws-extensions-for-dotnet-cli.sln @@ -25,8 +25,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.ECS.Tools.Test", "te EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{90827CB6-7488-4B53-904B-F045BCC754F3}" ProjectSection(SolutionItems) = preProject + CHANGELOG.md = CHANGELOG.md README.md = README.md - RELEASE.CHANGELOG.md = RELEASE.CHANGELOG.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Tools", "src\Amazon.Lambda.Tools\Amazon.Lambda.Tools.csproj", "{26CEBD54-FC5B-4437-A009-6643EE849413}" diff --git a/src/Amazon.Lambda.Tools/Commands/UpdateFunctionConfigCommand.cs b/src/Amazon.Lambda.Tools/Commands/UpdateFunctionConfigCommand.cs index b884fe6..7e9525c 100644 --- a/src/Amazon.Lambda.Tools/Commands/UpdateFunctionConfigCommand.cs +++ b/src/Amazon.Lambda.Tools/Commands/UpdateFunctionConfigCommand.cs @@ -651,7 +651,7 @@ private UpdateFunctionConfigurationRequest CreateConfigurationRequestIfDifferent request.LoggingConfig = new LoggingConfig(); } - if (!string.Equals(request.LoggingConfig.LogFormat, existingConfiguration.LoggingConfig?.LogFormat, StringComparison.Ordinal)) + if (!string.Equals(logFormat, existingConfiguration.LoggingConfig?.LogFormat, StringComparison.Ordinal)) { request.LoggingConfig.LogFormat = logFormat; different = true; @@ -666,7 +666,7 @@ private UpdateFunctionConfigurationRequest CreateConfigurationRequestIfDifferent request.LoggingConfig = new LoggingConfig(); } - if (!string.Equals(request.LoggingConfig.ApplicationLogLevel, existingConfiguration.LoggingConfig?.ApplicationLogLevel, StringComparison.Ordinal)) + if (!string.Equals(logApplicationLevel, existingConfiguration.LoggingConfig?.ApplicationLogLevel, StringComparison.Ordinal)) { request.LoggingConfig.ApplicationLogLevel = logApplicationLevel; different = true; @@ -681,7 +681,7 @@ private UpdateFunctionConfigurationRequest CreateConfigurationRequestIfDifferent request.LoggingConfig = new LoggingConfig(); } - if (!string.Equals(request.LoggingConfig.SystemLogLevel, existingConfiguration.LoggingConfig?.SystemLogLevel, StringComparison.Ordinal)) + if (!string.Equals(logSystemLevel, existingConfiguration.LoggingConfig?.SystemLogLevel, StringComparison.Ordinal)) { request.LoggingConfig.SystemLogLevel = logSystemLevel; different = true; @@ -696,7 +696,7 @@ private UpdateFunctionConfigurationRequest CreateConfigurationRequestIfDifferent request.LoggingConfig = new LoggingConfig(); } - if (!string.Equals(request.LoggingConfig.LogGroup, existingConfiguration.LoggingConfig?.LogGroup, StringComparison.Ordinal)) + if (!string.Equals(logGroup, existingConfiguration.LoggingConfig?.LogGroup, StringComparison.Ordinal)) { request.LoggingConfig.LogGroup = logGroup; different = true;