Skip to content

feat(envelopes): add Application Load Balancer envelope support#187

Merged
j-d-ha merged 8 commits into
mainfrom
feature/#186-add-Application-Load-Balancer-envelope
Nov 27, 2025
Merged

feat(envelopes): add Application Load Balancer envelope support#187
j-d-ha merged 8 commits into
mainfrom
feature/#186-add-Application-Load-Balancer-envelope

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Nov 27, 2025

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

Implements comprehensive support for AWS Application Load Balancer (ALB) events in the AwsLambda.Host framework through a new strongly-typed envelope package (AwsLambda.Host.Envelopes.Alb).

What's New:

  • New Package: AwsLambda.Host.Envelopes.Alb with AlbRequestEnvelope<T> and AlbResponseEnvelope<T> classes
  • Type-Safe ALB Handling: Transparent request/response envelope processing for ALB events
  • Full Test Coverage: 12 focused unit tests (6 request + 6 response) across net8.0, net9.0, net10.0
  • Complete Documentation: Package README with Quick Start, custom envelope examples, and AOT compilation guidance
  • Cross-Referenced: Updated all envelope package READMEs with links to related packages

✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests (12 new ALB envelope tests)
  • I've added/updated documentation or README (package README + parent envelope README)
  • I've followed the coding style for this project (C# 14, async patterns, XML docs)
  • I've tested the changes locally (all 64 envelope tests pass)

🧪 Related Issues or PRs

Closes #186


💬 Notes for Reviewers

Architecture:

  • Follows exact pattern parity with existing ApiGateway envelope
  • Uses IRequestEnvelope and IResponseEnvelope interfaces
  • Integrates with existing envelope middleware (no changes needed)
  • Supports custom serialization formats via abstract base classes
  • Ready for Native AOT compilation

Implementation:

  • Core Classes: AlbRequestEnvelopeBase<T>, AlbRequestEnvelope<T>, AlbResponseEnvelopeBase<T>, AlbResponseEnvelope<T>
  • Project Structure: src/Envelopes/AwsLambda.Host.Envelopes.Alb/
  • Namespace: AwsLambda.Host.Envelopes.Alb
  • NuGet Package: AwsLambda.Host.Envelopes.Alb

Test Results:

  • ✅ All 12 ALB envelope tests pass across net8.0, net9.0, net10.0
  • ✅ Total 64 envelope tests pass (existing + new)
  • ✅ Full solution builds without errors or warnings
  • ✅ NuGet package generated successfully

Testing:

  • Request envelope: valid JSON deserialization, null body handling, custom JSON options
  • Response envelope: valid JSON serialization, null body handling, custom JSON options

- Create ApplicationLoadBalancer envelope project
- Add project references and dependencies
- Configure project file for net8.0/net9.0/net10.0
- Add Amazon.Lambda.ApplicationLoadBalancerEvents to central package management
- Add AlbRequestEnvelopeBase<T>
- Add AlbRequestEnvelope<T> with JSON deserialization
- Add AlbResponseEnvelopeBase<T>
- Add AlbResponseEnvelope<T> with JSON serialization
- Add AlbRequestEnvelopeTests (6 test cases)
- Add AlbResponseEnvelopeTests (6 test cases)
- Full coverage of core envelope functionality
- All tests pass across net8.0, net9.0, net10.0
- Create package README with Quick Start and custom envelope examples
- Update parent envelope README with ALB reference
- Document AOT compilation support
- Simplify object initialization for `AlbResponseEnvelope` unit tests
- Replace `SqsEnvelope` with `SqsEnvelopeBase` for consistent base class usage
- Enhance documentation formatting for envelope abstract classes
- Improve readability by adjusting line breaks in XML comments
- Rename project folder from AwsLambda.Host.Envelopes.ApplicationLoadBalancer
  to AwsLambda.Host.Envelopes.Alb
- Rename namespace from AwsLambda.Host.Envelopes.ApplicationLoadBalancer
  to AwsLambda.Host.Envelopes.Alb
- Rename NuGet package ID to AwsLambda.Host.Envelopes.Alb
- Update test imports and project references
- Update envelope README with new package references
- Maintain consistency with class naming convention (AlbRequestEnvelope, etc.)
- Adjust line breaks for improved readability in ALB envelope README
- Reformat tables for consistent column alignment
- Make minor adjustments to maintain style consistency throughout the document
- Add AwsLambda.Host.Envelopes.Alb link in ApiGateway envelope README
- Add AwsLambda.Host.Envelopes.Alb link in SQS envelope README
- Maintain consistent cross-references across all envelope packages
@github-actions github-actions Bot added the type: feat New feature label Nov 27, 2025
@sonarqubecloud

Copy link
Copy Markdown

@j-d-ha
j-d-ha merged commit be42076 into main Nov 27, 2025
6 checks passed
@j-d-ha
j-d-ha deleted the feature/#186-add-Application-Load-Balancer-envelope branch November 27, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(envelopes): add Application Load Balancer envelope

1 participant