Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .autover/changes/388041c1-4920-4e10-994a-a71a83e09f54.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,31 @@
<AssemblyName>Amazon.Extensions.Configuration.SystemsManager</AssemblyName>
<RootNamespace>Amazon.Extensions.Configuration.SystemsManager</RootNamespace>
<OutputType>Library</OutputType>
<Version>6.2.2</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Amazon.Extensions.Configuration.SystemsManager</PackageId>
<Title>.NET Configuration Extensions for AWS Systems Manager</Title>
<Product>Amazon.Extensions.Configuration.SystemsManager</Product>
<Description>.NET Configuration Extensions for AWS Systems Manager</Description>
<Authors>Amazon Web Services</Authors>
<Copyright>2018-2024</Copyright>
<PackageTags>AWS;Amazon;aws-sdk-v3;SimpleSystemsManagement;configuration</PackageTags>
<PackageTags>AWS;Amazon;aws-sdk-v4;SimpleSystemsManagement;configuration</PackageTags>
<PackageProjectUrl>https://github.com/aws/aws-dotnet-extensions-configuration/</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/aws/aws-dotnet-extensions-configuration/</RepositoryUrl>
<Company>Amazon Web Services</Company>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>../ruleset.xml</CodeAnalysisRuleSet>

<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<Version>7.0.0-preview.1</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -35,11 +44,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.AppConfigData" Version="3.7.400.34" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.301" />
<PackageReference Include="AWSSDK.SimpleSystemsManagement" Version="3.7.402.13" />
<PackageReference Include="AWSSDK.AppConfigData" Version="4.0.0-preview.4" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.0-preview.4" />
<PackageReference Include="AWSSDK.SimpleSystemsManagement" Version="4.0.0-preview.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.*" />
<PackageReference Include="System.Text.Json" Condition=" '$(TargetFramework)' == 'netstandard2.0' " Version="8.0.5" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ public async Task<IDictionary<string, string>> GetDataAsync()

if(_appConfigDataClient != null)
{
return await GetDataFromServiceAsync().ConfigureAwait(false);
return await GetDataFromServiceAsync().ConfigureAwait(false)
?? new Dictionary<string, string>();
}
else
{
return await GetDataFromLambdaExtensionAsync().ConfigureAwait(false);
return await GetDataFromLambdaExtensionAsync().ConfigureAwait(false)
?? new Dictionary<string, string>();
}
}

Expand Down Expand Up @@ -126,7 +128,7 @@ private async Task<IDictionary<string, string>> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private async Task<IDictionary<string, string>> 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<Parameter>());
} while (!string.IsNullOrEmpty(nextToken));

return AddPrefix(Source.ParameterProcessor.ProcessParameters(parameters, Source.Path), Source.Prefix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.AppConfig" Version="3.7.401.22" />
<PackageReference Include="AWSSDK.AppConfig" Version="4.0.0-preview.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.400.34" />
<PackageReference Include="AWSSDK.SecurityToken" Version="4.0.0-preview.4" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
Expand Down