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

RESTEasy SAM support #3180

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@evanchooly
Copy link
Member

commented Jul 10, 2019

This provides support for using RESTEasy as the provider for SAM based applications. It does not currently support native mode. However, the needs for native mode here are essentially the same as the native mode Lambda support. In a subsequent PR, I'll update that code to support both deployment paradigms and attempt to clean up some performance issues.

Show resolved Hide resolved ...kus/amazon/lambda/resteasy/deployment/AmazonLambdaResteasyProcessor.java Outdated
import io.quarkus.maven.utilities.MojoUtils;

@Mojo(name = "configure-sam", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
public class GenerateSamConfigMojo extends AbstractMojo {

This comment has been minimized.

Copy link
@stuartwdouglas

stuartwdouglas Jul 10, 2019

Member

This is probably ok for now, but we need to move this sort of thing into the augment phase as much as possible at some point in the future.

This comment has been minimized.

Copy link
@dmlloyd

dmlloyd Jul 15, 2019

Member

TBH I think every thing we make a new Mojo for is going to make it that much harder to move to a build phase. And maybe I'm wrong but I am not sure I see a reason why this can't be done as build steps?

This comment has been minimized.

Copy link
@evanchooly

evanchooly Jul 15, 2019

Author Member

I would love it to be a build step. generating output to arbitrary locations gets tricky in ways that aren't maven specific

@dmlloyd

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

The WIP commits should be collapsed.

@gsmet

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

Yes, generally, please try to have meaningful atomic commits before pushing a PR (unless you just want some quick feedback).

@evanchooly

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

I always do squash merges so I don't generally worry about the intermittent commits. But i'll clean these up now.

@evanchooly evanchooly force-pushed the evanchooly:sam branch from 7e21281 to f5808e6 Jul 11, 2019

Justin Lee
@patriot1burke

This comment has been minimized.

Copy link

commented Jul 11, 2019

Before I even look, similar to the Azure PR I did, all this will need a rework after the HTTP layer is finalized. After that we'll just be pushing netty HttpMessages through a virtual channel from Azure/AWS. What will be cool about that is that you'll be able to run Resteasy, Undertow, and Vert.x Web with one AWS plugin.

@evanchooly evanchooly requested a review from stuartwdouglas Jul 12, 2019

@patriot1burke
Copy link

left a comment

I still think this should wait until we refactor HTTP in quarkus.

Here's what azure turned into after I prototyped this:

https://github.com/patriot1burke/quarkus/blob/virtual-netty/extensions/azure-functions-http/runtime/src/main/java/io/quarkus/azure/functions/resteasy/runtime/Function.java

Properties:

# This function uses the Nodejs v6.10 runtime.
Runtime: nodejs6.10

This comment has been minimized.

Copy link
@patriot1burke

patriot1burke Jul 15, 2019

Typo? nodejs6.10?

This comment has been minimized.

Copy link
@evanchooly

evanchooly Jul 15, 2019

Author Member

actually no. it's intended to ensure the mojo correctly updates the runtime to a working value.

@patriot1burke

This comment has been minimized.

Copy link

commented Jul 15, 2019

I don't see any documentation (that's needed IMO for a PR approval).

@patriot1burke

This comment has been minimized.

Copy link

commented Jul 15, 2019

How would tests be written? Would dev mode even work?

Show resolved Hide resolved ...in/java/io/quarkus/creator/phase/generateconfig/GenerateConfigPhase.java Outdated
import io.quarkus.maven.utilities.MojoUtils;

@Mojo(name = "configure-sam", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)
public class GenerateSamConfigMojo extends AbstractMojo {

This comment has been minimized.

Copy link
@dmlloyd

dmlloyd Jul 15, 2019

Member

TBH I think every thing we make a new Mojo for is going to make it that much harder to move to a build phase. And maybe I'm wrong but I am not sure I see a reason why this can't be done as build steps?

Justin Lee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.