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

Basic support for AWS Lambdas #1042

Merged
merged 4 commits into from
Feb 28, 2019
Merged

Basic support for AWS Lambdas #1042

merged 4 commits into from
Feb 28, 2019

Conversation

evanchooly
Copy link
Member

Running in native mode doesn't quite work yet but this is functional enough for folks to start playing with. There are some limitations in terms of input and output (incoming POJOs work but necessarily returning them yet) but these bits can be iterated on depending on how far down this road we want to go.

@dmlloyd
Copy link
Member

dmlloyd commented Feb 25, 2019

Note: this PR is for running AWS lambdas within Quarkus, not for running Quarkus as a lambda.

Copy link
Member

@dmlloyd dmlloyd left a comment

Choose a reason for hiding this comment

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

Looks OK but really needs to be squashed down to probably one commit.

@evanchooly
Copy link
Member Author

Yeah. Definitely a squash merge for sure.

@evanchooly
Copy link
Member Author

i went ahead and squashed the commits now rather than waiting until the merge.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I added a few comments inline, mostly about the pom files and the structure.

extensions/lambda/pom.xml Show resolved Hide resolved
extensions/lambda/quarkus-lambda-deployment/pom.xml Outdated Show resolved Hide resolved
extensions/lambda/quarkus-lambda-runtime/pom.xml Outdated Show resolved Hide resolved
extensions/lambda/quarkus-lambda-sample/pom.xml Outdated Show resolved Hide resolved
extensions/lambda/quarkus-lambda-deployment/pom.xml Outdated Show resolved Hide resolved
.setLoadOnStartup(1)
.addMapping("/" + mapping));

try (final ClassCreator creator = new ClassCreator(classOutput, servletName, null, LambdaServlet.class.getName())) {
Copy link
Member

Choose a reason for hiding this comment

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

This should really not be necessary, there is some stuff missing from the ServletBuildItem, I have added it at #1045. With this you could either use a template+ custom InstanceFactory to just directly pass the parameter, or specify the class name in the init params and load it in the init method.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. I'll update this code on #1045 is merged.

extensions/lambda/quarkus-lambda-runtime/pom.xml Outdated Show resolved Hide resolved
extensions/lambda/pom.xml Outdated Show resolved Hide resolved
extensions/lambda/quarkus-lambda-deployment/pom.xml Outdated Show resolved Hide resolved
extensions/lambda/quarkus-lambda-sample/pom.xml Outdated Show resolved Hide resolved
@stuartwdouglas
Copy link
Member

Do we actually want to merge this before it has native support? It would be the only extension in the code base that does not run on native.

@evanchooly
Copy link
Member Author

I could go either way but I know there were folks that wanted to see a bit of it in action. If you say you want me to get native working first, though, that's what I'll do.

@evanchooly
Copy link
Member Author

native-image support fixed.

@stuartwdouglas stuartwdouglas merged commit 1870138 into quarkusio:master Feb 28, 2019
@stuartwdouglas stuartwdouglas added this to the 0.10.0 milestone Feb 28, 2019
@evanchooly evanchooly deleted the lambda branch February 28, 2019 12:11
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.

None yet

4 participants