Skip to content

Commit 2b587db

Browse files
authored
Merge branch 'develop' into feature/metrics-multiple-dimensions
2 parents 8331132 + 177f9f3 commit 2b587db

File tree

12 files changed

+44
-18
lines changed

12 files changed

+44
-18
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: dotnet test --no-restore --filter "Category!=E2E" --collect:"XPlat Code Coverage" --results-directory ./codecov --verbosity normal
4141

4242
- name: Codecov
43-
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # 5.4.2
43+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # 5.4.3
4444
with:
4545
token: ${{ secrets.CODECOV_TOKEN }}
4646
fail_ci_if_error: false

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535

3636
# Initializes the CodeQL tools for scanning.
3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
38+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
3939
with:
4040
languages: ${{ matrix.language }}
4141

4242
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4343
# If this step fails, then you should remove it and run the build manually (see below)
4444
- name: Autobuild
45-
uses: github/codeql-action/autobuild@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
45+
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
4646

4747
# ℹ️ Command-line programs to run using the OS shell.
4848
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -55,4 +55,4 @@ jobs:
5555
# ./location_of_script_within_repo/buildscript.sh
5656

5757
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
58+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18

.github/workflows/dispatch_analytics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
environment: analytics
3232
steps:
3333
- name: Configure AWS credentials
34-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5
34+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df
3535
with:
3636
aws-region: eu-central-1
3737
role-to-assume: ${{ secrets.AWS_ANALYTICS_ROLE_ARN }}

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Build docs website
3737
run: make build-docs-website
3838
- name: Configure AWS credentials
39-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
39+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
4040
with:
4141
aws-region: us-east-1
4242
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
@@ -69,7 +69,7 @@ jobs:
6969
docfx apidocs/docfx.json
7070
7171
- name: Configure AWS credentials
72-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
72+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
7373
with:
7474
aws-region: us-east-1
7575
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}

.github/workflows/e2e-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3535

3636
- name: Configure AWS credentials
37-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
37+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
3838
with:
3939
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
4040
aws-region: us-east-1
@@ -78,7 +78,7 @@ jobs:
7878
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
7979

8080
- name: Configure AWS credentials
81-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
81+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
8282
with:
8383
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
8484
aws-region: us-east-1
@@ -119,7 +119,7 @@ jobs:
119119
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
120120

121121
- name: Configure AWS credentials
122-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
122+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
123123
with:
124124
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
125125
aws-region: us-east-1
@@ -151,7 +151,7 @@ jobs:
151151
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
152152

153153
- name: Configure AWS credentials
154-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
154+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
155155
with:
156156
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
157157
aws-region: us-east-1
@@ -192,7 +192,7 @@ jobs:
192192
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
193193

194194
- name: Configure AWS credentials
195-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
195+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
196196
with:
197197
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
198198
aws-region: us-east-1

.github/workflows/ossf_scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ jobs:
4343

4444
# Upload the results to GitHub's code scanning dashboard.
4545
- name: "Upload to code-scanning"
46-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
46+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
4747
with:
4848
sarif_file: results.sarif

.github/workflows/reusable_publish_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
poetry run mike set-default --push latest
6969
7070
- name: Configure AWS credentials
71-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
71+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
7272
with:
7373
aws-region: us-east-1
7474
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
@@ -99,7 +99,7 @@ jobs:
9999
brew install -f docfx --skip-cask-deps --ignore-dependencies
100100
docfx apidocs/docfx.json
101101
- name: Configure AWS credentials
102-
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 # v4.2.0
102+
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1
103103
with:
104104
aws-region: us-east-1
105105
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}

.github/workflows/secure_workflows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
- name: Ensure 3rd party workflows have SHA pinned
22-
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@2d6823da4039243036c86d76f503c84e2ded2517 # v3.0.24
22+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@fc87bb5b5a97953d987372e74478de634726b3e5 # v3.0.25
2323
with:
2424
# Trusted GitHub Actions and/or organizations
2525
allowlist: |

docs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# v9.1.18
2-
FROM squidfunk/mkdocs-material@sha256:f6c81d538499f5755c8d1486f0abcda50bb631be391890ef823fcba18803114a
2+
FROM squidfunk/mkdocs-material@sha256:eb04b60c566a8862be6b553157c16a92fbbfc45d71b7e4e8593526aecca63f52
33

44
COPY requirements.txt /tmp/
55
RUN pip install --require-hashes -r /tmp/requirements.txt

libraries/src/AWS.Lambda.Powertools.BatchProcessing/BatchProcessorAttribute.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
using System;
1717
using System.Collections.Generic;
18+
using System.Diagnostics.CodeAnalysis;
1819
using System.Linq;
1920
using System.Threading;
2021
using System.Threading.Tasks;
@@ -141,21 +142,25 @@ public class BatchProcessorAttribute : UniversalWrapperAttribute
141142
/// <summary>
142143
/// Type of batch processor.
143144
/// </summary>
145+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
144146
public Type BatchProcessor { get; set; }
145147

146148
/// <summary>
147149
/// Type of batch processor provider.
148150
/// </summary>
151+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
149152
public Type BatchProcessorProvider { get; set; }
150153

151154
/// <summary>
152155
/// Type of record handler.
153156
/// </summary>
157+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
154158
public Type RecordHandler { get; set; }
155159

156160
/// <summary>
157161
/// Type of record handler provider.
158162
/// </summary>
163+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
159164
public Type RecordHandlerProvider { get; set; }
160165

161166
/// <summary>

libraries/src/AWS.Lambda.Powertools.Parameters/Internal/Transform/JsonTransformer.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,31 @@ namespace AWS.Lambda.Powertools.Parameters.Internal.Transform;
2323
/// </summary>
2424
internal class JsonTransformer : ITransformer
2525
{
26+
private readonly JsonSerializerOptions _options;
27+
28+
/// <summary>
29+
/// Initializes a new instance of the <see cref="JsonTransformer"/> class.
30+
/// </summary>
31+
public JsonTransformer()
32+
{
33+
_options = new JsonSerializerOptions
34+
{
35+
PropertyNameCaseInsensitive = true
36+
};
37+
}
38+
2639
/// <summary>
2740
/// Deserialize a JSON value from a JSON string.
2841
/// </summary>
2942
/// <param name="value">JSON string.</param>
3043
/// <typeparam name="T">JSON value type.</typeparam>
3144
/// <returns>JSON value.</returns>
45+
#if NET6_0_OR_GREATER
46+
[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode",
47+
Justification = "Types are expected to be known at compile time")]
48+
[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
49+
Justification = "Types are expected to be preserved")]
50+
#endif
3251
public T? Transform<T>(string value)
3352
{
3453
if (typeof(T) == typeof(string))
@@ -37,6 +56,6 @@ internal class JsonTransformer : ITransformer
3756
if (string.IsNullOrWhiteSpace(value))
3857
return default;
3958

40-
return JsonSerializer.Deserialize<T>(value);
59+
return JsonSerializer.Deserialize<T>(value, _options);
4160
}
4261
}

libraries/tests/AWS.Lambda.Powertools.Parameters.Tests/AppConfig/AppConfigProviderTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16+
using System.Diagnostics.CodeAnalysis;
1617
using System.Text;
1718
using System.Text.Json;
1819
using System.Text.Json.Nodes;
@@ -32,6 +33,7 @@
3233

3334
namespace AWS.Lambda.Powertools.Parameters.Tests.AppConfig;
3435

36+
[SuppressMessage("Usage", "xUnit1030:Do not call ConfigureAwait(false) in test method")]
3537
public class AppConfigProviderTest
3638
{
3739
[Fact]

0 commit comments

Comments
 (0)