From 9e10835a06fe0709c2ad51cb1735b4dd27a57527 Mon Sep 17 00:00:00 2001 From: Phil Asmar Date: Wed, 16 Oct 2024 17:37:59 -0400 Subject: [PATCH 1/3] feat: add support for .NET SDK V4 --- ...nsions.Configuration.SystemsManager.csproj | 22 ++++++++++++++----- .../AppConfig/AppConfigProcessor.cs | 2 +- ....Configuration.SystemsManager.Integ.csproj | 4 ++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/Amazon.Extensions.Configuration.SystemsManager/Amazon.Extensions.Configuration.SystemsManager.csproj b/src/Amazon.Extensions.Configuration.SystemsManager/Amazon.Extensions.Configuration.SystemsManager.csproj index d1d55c6..cf82610 100644 --- a/src/Amazon.Extensions.Configuration.SystemsManager/Amazon.Extensions.Configuration.SystemsManager.csproj +++ b/src/Amazon.Extensions.Configuration.SystemsManager/Amazon.Extensions.Configuration.SystemsManager.csproj @@ -6,15 +6,13 @@ Amazon.Extensions.Configuration.SystemsManager Amazon.Extensions.Configuration.SystemsManager Library - 6.2.2 true Amazon.Extensions.Configuration.SystemsManager .NET Configuration Extensions for AWS Systems Manager Amazon.Extensions.Configuration.SystemsManager .NET Configuration Extensions for AWS Systems Manager Amazon Web Services - 2018-2024 - AWS;Amazon;aws-sdk-v3;SimpleSystemsManagement;configuration + AWS;Amazon;aws-sdk-v4;SimpleSystemsManagement;configuration https://github.com/aws/aws-dotnet-extensions-configuration/ LICENSE icon.png @@ -22,6 +20,17 @@ Amazon Web Services true ../ruleset.xml + + true + true + true + snupkg + + 7.0.0-preview.1 + + + + true @@ -35,11 +44,12 @@ - - - + + + + diff --git a/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs b/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs index e3acf2c..61c369a 100644 --- a/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs +++ b/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs @@ -126,7 +126,7 @@ private async Task> GetDataFromServiceAsync() var response = await _appConfigDataClient.GetLatestConfigurationAsync(request).ConfigureAwait(false); PollConfigurationToken = response.NextPollConfigurationToken; - NextAllowedPollTime = DateTime.UtcNow.AddSeconds(response.NextPollIntervalInSeconds); + NextAllowedPollTime = DateTime.UtcNow.AddSeconds(response.NextPollIntervalInSeconds ?? 0); // Configuration is empty when the last received config is the latest // so only attempt to parse the AppConfig response when it is not empty diff --git a/test/Amazon.Extensions.Configuration.SystemsManager.Integ/Amazon.Extensions.Configuration.SystemsManager.Integ.csproj b/test/Amazon.Extensions.Configuration.SystemsManager.Integ/Amazon.Extensions.Configuration.SystemsManager.Integ.csproj index 72d0664..c2c3acb 100644 --- a/test/Amazon.Extensions.Configuration.SystemsManager.Integ/Amazon.Extensions.Configuration.SystemsManager.Integ.csproj +++ b/test/Amazon.Extensions.Configuration.SystemsManager.Integ/Amazon.Extensions.Configuration.SystemsManager.Integ.csproj @@ -7,9 +7,9 @@ - + - + all From 7911c578fe0ebf658c156454cbdf17da05c1c047 Mon Sep 17 00:00:00 2001 From: Phil Asmar Date: Wed, 16 Oct 2024 22:49:41 -0400 Subject: [PATCH 2/3] address norm's comments --- .../AppConfig/AppConfigProcessor.cs | 6 ++++-- .../Internal/SystemsManagerProcessor.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs b/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs index 61c369a..094fde8 100644 --- a/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs +++ b/src/Amazon.Extensions.Configuration.SystemsManager/AppConfig/AppConfigProcessor.cs @@ -84,11 +84,13 @@ public async Task> GetDataAsync() if(_appConfigDataClient != null) { - return await GetDataFromServiceAsync().ConfigureAwait(false); + return await GetDataFromServiceAsync().ConfigureAwait(false) + ?? new Dictionary(); } else { - return await GetDataFromLambdaExtensionAsync().ConfigureAwait(false); + return await GetDataFromLambdaExtensionAsync().ConfigureAwait(false) + ?? new Dictionary(); } } diff --git a/src/Amazon.Extensions.Configuration.SystemsManager/Internal/SystemsManagerProcessor.cs b/src/Amazon.Extensions.Configuration.SystemsManager/Internal/SystemsManagerProcessor.cs index c569234..d03f703 100644 --- a/src/Amazon.Extensions.Configuration.SystemsManager/Internal/SystemsManagerProcessor.cs +++ b/src/Amazon.Extensions.Configuration.SystemsManager/Internal/SystemsManagerProcessor.cs @@ -63,7 +63,7 @@ private async Task> GetParametersByPathAsync() { var response = await client.GetParametersByPathAsync(new GetParametersByPathRequest { Path = Source.Path, Recursive = true, WithDecryption = true, NextToken = nextToken, ParameterFilters = Source.Filters }).ConfigureAwait(false); nextToken = response.NextToken; - parameters.AddRange(response.Parameters); + parameters.AddRange(response.Parameters ?? new List()); } while (!string.IsNullOrEmpty(nextToken)); return AddPrefix(Source.ParameterProcessor.ProcessParameters(parameters, Source.Path), Source.Prefix); From e7a348369cc73679655815c44ec845f475b24c75 Mon Sep 17 00:00:00 2001 From: Phil Asmar Date: Thu, 17 Oct 2024 08:59:16 -0400 Subject: [PATCH 3/3] add change file --- .../388041c1-4920-4e10-994a-a71a83e09f54.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .autover/changes/388041c1-4920-4e10-994a-a71a83e09f54.json diff --git a/.autover/changes/388041c1-4920-4e10-994a-a71a83e09f54.json b/.autover/changes/388041c1-4920-4e10-994a-a71a83e09f54.json new file mode 100644 index 0000000..5c7b1fa --- /dev/null +++ b/.autover/changes/388041c1-4920-4e10-994a-a71a83e09f54.json @@ -0,0 +1,13 @@ +{ + "Projects": [ + { + "Name": "Amazon.Extensions.Configuration.SystemsManager", + "Type": "Major", + "ChangelogMessages": [ + "Updated the .NET SDK dependencies to the latest version 4.0.0-preview.4", + "Marked project as trimmable", + "Added SourceLink support" + ] + } + ] +} \ No newline at end of file