Skip to content

chore: Feature/appsync events #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 24, 2025
Merged

chore: Feature/appsync events #858

merged 16 commits into from
Apr 24, 2025

Conversation

hjgraca
Copy link
Contributor

@hjgraca hjgraca commented Apr 24, 2025

Please provide the issue number

Issue number: #859

Summary

Changes

Add Event Handler AppSync Events feature

This pull request introduces a new AWS.Lambda.Powertools.EventHandler package to the solution, focusing on handling AWS AppSync events. The changes include adding the project to the solution file, implementing various classes and utilities to support AppSync event handling, and introducing an internal LRU cache for route resolutions. Below is a summary of the most important changes:

Solution and Project Setup:

  • Added the AWS.Lambda.Powertools.EventHandler project and its corresponding test project to the solution file AWS.Lambda.Powertools.sln. Configured build and debug settings for the new projects. [1] [2] [3]

Core Event Handling Implementation:

  • Added the AWS.Lambda.Powertools.EventHandler project with its csproj file, targeting .NET 8.0 and including a dependency on Amazon.Lambda.Core.
  • Implemented classes to represent AppSync events and their components, including AppSyncEvent, AppSyncEventsRequest, AppSyncEventsResponse, and AppSyncEventsOperation. These classes provide structured representations of AppSync event payloads and operations. [1] [2] [3] [4]

AppSync Identity Models:

  • Added classes for various AppSync authorization identities, such as AppSyncCognitoIdentity, AppSyncIamIdentity, AppSyncLambdaIdentity, and AppSyncOidcIdentity. These classes encapsulate identity-specific details for different authorization modes. [1] [2] [3] [4]

Supporting Structures:

  • Added supporting classes like Channel, ChannelNamespace, Information, and RequestContext to provide detailed contextual information about AppSync events and operations. [1] [2] [3] [4] [5]

Internal Utilities:

  • Introduced an LRUCache class for caching route resolutions, implementing a basic least-recently-used cache mechanism. This utility is designed for internal use within the event handler package.

User experience

Please share what the user experience looks like before and after this change

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.

@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation tests labels Apr 24, 2025
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 24, 2025
@github-actions github-actions bot added the internal Maintenance changes label Apr 24, 2025
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 73.50993% with 120 lines in your changes missing coverage. Please review.

Project coverage is 75.77%. Comparing base (259d502) to head (94fdcc2).
Report is 43 commits behind head on develop.

Files with missing lines Patch % Lines
...ventHandler/AppSyncEvents/AppSyncEventsResolver.cs 71.71% 71 Missing and 13 partials ⚠️
...s.EventHandler/AppSyncEvents/AppSyncIamIdentity.cs 0.00% 8 Missing ⚠️
...entHandler/AppSyncEvents/AppSyncCognitoIdentity.cs 0.00% 7 Missing ⚠️
...ventHandler/AppSyncEvents/AppSyncRequestContext.cs 0.00% 6 Missing ⚠️
...ambda.Powertools.EventHandler/Internal/LRUCache.cs 88.37% 4 Missing and 1 partial ⚠️
...ools.EventHandler/Internal/RouteHandlerRegistry.cs 92.06% 1 Missing and 4 partials ⚠️
....EventHandler/AppSyncEvents/AppSyncOidcIdentity.cs 0.00% 3 Missing ⚠️
...EventHandler/AppSyncEvents/AppSyncEventsRequest.cs 88.88% 1 Missing ⚠️
...ventHandler/AppSyncEvents/AppSyncLambdaIdentity.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #858      +/-   ##
===========================================
- Coverage    75.88%   75.77%   -0.11%     
===========================================
  Files          233      249      +16     
  Lines         9422     9875     +453     
  Branches      1031     1073      +42     
===========================================
+ Hits          7150     7483     +333     
- Misses        1953     2055     +102     
- Partials       319      337      +18     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hjgraca hjgraca merged commit 7357a5b into develop Apr 24, 2025
7 of 9 checks passed
@hjgraca hjgraca deleted the feature/appsync-events branch April 24, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation internal Maintenance changes size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants