Skip to content

Conversation

hjgraca
Copy link
Contributor

@hjgraca hjgraca commented Sep 26, 2024

Please provide the issue number

Issue number: #212

Summary

Changes

Support for AOT in Idempotency and JMESPath.

Done:

  • Add JMESPathSerializationContext.cs and Serializer.
  • Add Idempotency IdempotencySerializationContext.cs and Serializer.
  • Update code to use both serializers

User experience

For serlializing client types inside Idempotency we now have a new method WithJsonSerializationContext.
This method receives the client JsonSerializationContext

image

Checklist

Please leave checklist items unchecked if they do not apply to your change.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

…dempotencySerializationContext.cs and Serializer. Update code to use both serializers
@hjgraca hjgraca added this to the .NET AOT milestone Sep 26, 2024
@auto-assign auto-assign bot requested review from amirkaws and sliedig September 26, 2024 18:25
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 26, 2024
@github-actions github-actions bot added the internal Maintenance changes label Sep 26, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 82.92683% with 14 lines in your changes missing coverage. Please review.

Project coverage is 73.43%. Comparing base (6ee247c) to head (af59143).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
...ency/Internal/Serializers/IdempotencySerializer.cs 76.59% 7 Missing and 4 partials ⚠️
...mbda.Powertools.Idempotency/IdempotentAttribute.cs 50.00% 0 Missing and 1 partial ⚠️
...S.Lambda.Powertools.JMESPath/Values/DoubleValue.cs 0.00% 1 Missing ⚠️
...bda.Powertools.JMESPath/Values/JsonElementValue.cs 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #653      +/-   ##
===========================================
+ Coverage    73.42%   73.43%   +0.01%     
===========================================
  Files          203      203              
  Lines         8173     8181       +8     
  Branches       877      878       +1     
===========================================
+ Hits          6001     6008       +7     
- Misses        1880     1881       +1     
  Partials       292      292              
Flag Coverage Δ
unittests 73.43% <82.92%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarqubecloud bot commented Oct 3, 2024

- Implemented AOT-Function with idempotency configuration and handler.
- Created AOT-FunctionHandlerTest and AOT-FunctionPayloadSubsetTest projects.
- Updated FunctionTests to include AOT-specific tests for idempotency.
- Enhanced documentation to include AOT support details.
…pport' into aot(idempotency|jmespath)-aot-support
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Feb 4, 2025
@pull-request-size pull-request-size bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 4, 2025
Copy link

sonarqubecloud bot commented Feb 4, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
9.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@hjgraca
Copy link
Contributor Author

hjgraca commented Feb 4, 2025

@hjgraca hjgraca self-assigned this Feb 5, 2025
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one @hjgraca! APPROVED!

Comment on lines +125 to +127
#if NET8_0_OR_GREATER
[Obsolete("Idempotency uses MD5 and does not support other hash algorithms.")]
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think make sense we add this in other runtime because we don't allow customer to bring others hash algorithm.

@hjgraca hjgraca merged commit fb7e6c3 into aws-powertools:develop Feb 5, 2025
8 of 9 checks passed
@hjgraca hjgraca deleted the aot(idempotency|jmespath)-aot-support branch February 5, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aot area/idempotency documentation Improvements or additions to documentation internal Maintenance changes size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tests

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants