Skip to content

Conversation

@svozza
Copy link
Contributor

@svozza svozza commented Nov 16, 2025

Summary

This PR adds support for ALB lambda integrations, as with the other implementations, the router autodetects the event type and returns the appropriate response.

Changes

  • Added ALB event type guard
  • Added ALB event to Request conversion function
  • Added ALB response to Response conversion function
  • Added look up map for HTTP codes to set descriptionStatus field correctly

Testing

  • Added ALB tests to describe.each block in routing tests
  • Added unit tests to specifically test statusDescription field
  • Deployed to lambda function and tested with ALB event

Issue number: closes #4758


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.

@svozza svozza requested a review from sdangol November 16, 2025 11:20
@svozza svozza self-assigned this Nov 16, 2025
@pull-request-size pull-request-size bot added the size/XL PRs between 500-999 LOC, often PRs that grown with feedback label Nov 16, 2025
@boring-cyborg boring-cyborg bot added event-handler This item relates to the Event Handler Utility tests PRs that add or change tests labels Nov 16, 2025
@svozza svozza force-pushed the event-hanlder/alb-support branch from 024bfe3 to e88ed90 Compare November 16, 2025 11:24
@svozza svozza force-pushed the event-hanlder/alb-support branch from e88ed90 to 1cf1cf8 Compare November 16, 2025 18:04
@svozza svozza force-pushed the event-hanlder/alb-support branch from 98717a2 to e78f578 Compare November 17, 2025 11:38
@svozza
Copy link
Contributor Author

svozza commented Nov 17, 2025

The SonarQube warning is from a piece of code I haven't touched.

@dreamorosi
Copy link
Contributor

The SonarQube warning is from a piece of code I haven't touched.

You're right - it checks the file I think.

If possible, still address it please.

@svozza
Copy link
Contributor Author

svozza commented Nov 17, 2025

TIL about string.raw. Have pushed the fix.

@svozza svozza force-pushed the event-hanlder/alb-support branch from e78f578 to 7b11fcb Compare November 17, 2025 11:58
@sonarqubecloud
Copy link

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

PR looks good to me, thanks for this!

For the HttpStatusCodes review comment, I would've agreed with @sdangol's proposal but I can see the argument you made about complexity. I'm ambivalent about keeping this way or changing it so I'll leave the decision to you two.

Once the comments are resolved (either way), feel free to merge.

@svozza svozza merged commit a470892 into main Nov 17, 2025
37 checks passed
@svozza svozza deleted the event-hanlder/alb-support branch November 17, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event-handler This item relates to the Event Handler Utility size/XL PRs between 500-999 LOC, often PRs that grown with feedback tests PRs that add or change tests

Projects

Status: Working on it

Development

Successfully merging this pull request may close these issues.

Feature request: Add support for ALB integration

3 participants