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

Migrate Lambda to use servlet core #1650

Merged
merged 113 commits into from
May 29, 2023
Merged

Conversation

timyates
Copy link
Contributor

@timyates timyates commented Mar 17, 2023

  • It updates to the latest milestones
  • It deletes CDK module (it will be moved to starter).
  • It moves away from AWS Serverless Java Container. It use servlet core.
  • It supports both payload versions v1 and v2.
  • Handlers use standard AWS Lambda Java Events POJOs.
  • TCK passes almost complety.
  • There is some work still to do in the the proxy-test. Several tests don't pass.

@timyates
Copy link
Contributor Author

Flux test currently fails with Expected received body of '{"scanAvailable":true,"prefetch":-1}' to contain '[{"name":"Joe"},{"name":"Lewis"}]' so it's serializing the Flux, not the contents of the flux... I've seen this before, I wonder what I'm missing.

This also doesn't currently support binary payloads in the body, we will need to mime encode them

@graemerocher
Copy link
Contributor

do you have the micronaut-reactor module on the classpath for the tests?

@timyates
Copy link
Contributor Author

Added testImplementation(mnReactor.micronaut.reactor) to the tck build, but it didn't seem to make a difference 🤔

@sdelamo sdelamo added the type: breaking Introduces a breaking change label May 24, 2023

private ServletHttpHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> initializeHandler() {
ApiGatewayProxyEventHandler apiGatewayProxyEventHandler = new ApiGatewayProxyEventHandler(applicationContext);
Runtime.getRuntime().addShutdownHook(
Copy link
Contributor

@driverpt driverpt May 26, 2023

Choose a reason for hiding this comment

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

Suggestion: Add Base class AWSLambdaHttpRequestFunction w/ method onShutdown()

@sdelamo sdelamo mentioned this pull request May 26, 2023
@sdelamo sdelamo requested a review from graemerocher May 26, 2023 10:55
@sdelamo sdelamo marked this pull request as ready for review May 26, 2023 10:55
Copy link
Contributor

@graemerocher graemerocher left a comment

Choose a reason for hiding this comment

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

looks good, just go through the code and annotate more types and packages with @Internal since I think we should keep the public API surface area here small

@sonarcloud
Copy link

sonarcloud bot commented May 29, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 16 Code Smells

0.0% 0.0% Coverage
8.7% 8.7% Duplication

@graemerocher graemerocher merged commit f8cebbb into master May 29, 2023
@graemerocher graemerocher deleted the proxyevent-servlet-core branch May 29, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: breaking Introduces a breaking change type: enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants