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

Smallrye + lambda extension is not injecting any request context variables #36171

Open
jfalcos opened this issue Sep 26, 2023 · 2 comments
Open

Comments

@jfalcos
Copy link

jfalcos commented Sep 26, 2023

Describe the bug

Hi everyone,

I created a sample project that has the quarkus-smallrye-graphql & quarkus-amazon-lambda-rest dependencies to test how would the integration look like. I'm planning on putting it in an AWS APIGateway and that worked just fine but when I try to inject the request context variables from API Gateway, I get nothing.

I attached my sample project. It's pretty barebones, just trying to get it to print the context.

I have successfully deployed it to an aws apigateway using the container native runtime and everything works except the context variables.

Appreciate any guidance or help with this!
Thanks

sample project.zip

Expected behavior

Context variables should get injected

Actual behavior

I don't get any of the context variables in my output

{
    "data": {
        "sayHello": "Hello John [context1={\"requestTimeEpoch\":0}][context2={\"requestTimeEpoch\":0}][context3={}][context4={}]"
    }
}

How to Reproduce?

  1. Download the zip file.
  2. Deploy it to AWS APIGateway
  3. Make a request using
{ 
    sayHello(name: "John")
}

as the body

Output of uname -a or ver

No response

Output of java -version

Java(TM) SE Runtime Environment Oracle GraalVM 17.0.8+9.1 (build 17.0.8+9-LTS-jvmci-23.0-b14)

GraalVM version (if different from Java)

GraalVM 17.0.8+9.1

Quarkus version or git rev

3.4.1

Build tool (ie. output of mvnw --version or gradlew --version)

cmd /c call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && mvn install -Dnative -DskipTests -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17

Additional information

No response

@jfalcos jfalcos added the kind/bug Something isn't working label Sep 26, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 26, 2023

/cc @Karm (mandrel), @galderz (mandrel), @matejvasek (amazon-lambda), @patriot1burke (amazon-lambda), @zakkak (mandrel)

@geoand geoand changed the title Small-rye + lambda extension is not injecting any request context variables Smallrye + lambda extension is not injecting any request context variables Sep 28, 2023
@galderz
Copy link
Member

galderz commented Oct 5, 2023

Can you reproduce the issue outside of AWS, say running locally? Also, do things work as expected in JVM mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants