Skip to content
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

Add ALB Context to API GW Payload V2 #491

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Conversation

driverpt
Copy link
Contributor

@driverpt driverpt commented Dec 5, 2022

Issue #489

Description of changes:
Adds ALB Context to Request Context. Source

By submitting this pull request

  • [ X ] I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • [ X ] I confirm that I've made a best effort attempt to update all relevant documentation.

@driverpt driverpt changed the title Fixes #489 Add ALB Context to API GW Payload V2 Dec 5, 2022
@deki
Copy link
Collaborator

deki commented Dec 5, 2022

Hi @driverpt,
thank you very much for your contribution. While validating the changes, I'm seeing test failures locally. Our GitHub CI action was misconfigured, otherwise it would have reported it here (it's now fixed in main). Can you please rebase on main and push again so make sure those are not related?

@deki deki closed this Dec 5, 2022
@deki deki reopened this Dec 5, 2022
@driverpt
Copy link
Contributor Author

driverpt commented Dec 6, 2022

Done

@deki
Copy link
Collaborator

deki commented Dec 6, 2022

The changes currently cause com.amazonaws.serverless.proxy.spark.HelloWorldSparkStreamTest and com.amazonaws.serverless.proxy.spring.ServletAppTest to fail. I can take a closer look next week...

@driverpt
Copy link
Contributor Author

driverpt commented Dec 6, 2022

Hello @deki , i think it should be fixed now. There was a missing @JsonIgnore

@driverpt
Copy link
Contributor Author

Any ETA on this one ?

@deki
Copy link
Collaborator

deki commented Dec 12, 2022

On my list for this week, first tests were successful.

We may switch to aws-lambda-java-events lib in the future and I'm wondering about this:
https://github.com/aws/aws-lambda-java-libs/blob/events-v4-serialization-v2/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/ApplicationLoadBalancerRequestEvent.java

@driverpt
Copy link
Contributor Author

Alb request is pretty much the same as Payload V2. I also agree this lib should be switched to use Events Library, but that would probably be a breaking change.

@deki
Copy link
Collaborator

deki commented Dec 12, 2022

Yeah that's a 2.0 thing, we will not do it now. I was just thinking that it is probably not enough to have a single event (like in aws-lambda-java-events lib) but we rather need ApplicationLoadBalancerRequestEventV1 and ApplicationLoadBalancerRequestEventV2, don't we?

@driverpt
Copy link
Contributor Author

@deki , I think that SRP (Single Responsibility Principle) should be applied where possible, as in, 1 Event = 1 Class

@driverpt
Copy link
Contributor Author

@deki , do you want me to change to separate events and apply SRP ?

@deki deki merged commit d0e2752 into aws:main Dec 13, 2022
@deki
Copy link
Collaborator

deki commented Dec 13, 2022

No let's keep it like this for know and refactor for 2.0.

@driverpt driverpt deleted the add-alb-to-http-v2 branch December 21, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants