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

Documentation suggests Context can be injected into Funqy function #10592

Closed
richiethom opened this issue Jul 9, 2020 · 5 comments
Closed

Documentation suggests Context can be injected into Funqy function #10592

richiethom opened this issue Jul 9, 2020 · 5 comments
Labels
area/funqy kind/bug Something isn't working
Milestone

Comments

@richiethom
Copy link
Contributor

Describe the bug
This is probably more of a documentation problem than anything else. In the Funqy documentation, it suggests that Context Injection is possible via the @Context annotation.

Whatever I have tried I have not been able to inject an AWS context, no matter whether I'm running on SAM Local or on AWS - nothing is injected against the @Context annotation.

Expected behavior
A context object is injected, allowing me to access contextual information about the container. In the case of AWS this should be an implementation of com.amazonaws.services.lambda.runtime.Context.

Actual behavior
The context object is null.

To Reproduce
Steps to reproduce the behavior:

  1. Check out the Funqy Amazon Lambda HTTP Quickstart
  2. Modify GreetingFunction.java: public Greeting greet(Friend friend, @Context com.amazonaws.services.lambda.runtime.Context context) {
  3. Run

Invoking the function via PostMan, the context object is null.

Environment (please complete the following information):

  • Output of uname -a or ver: NA
  • Output of java -version: lambci/lambda:java11 Docker container image
  • GraalVM version (if different from Java): NA
  • Quarkus version or git rev: 1.6.0
  • Build tool (ie. output of mvnw --version or gradlew --version): 3.6.3

Additional context
Like I said, it's hard to know if this is a bug in Quarkus or a bug in the documentation. I realise that Funqy is a work in progress; perhaps I'm being too eager?

@richiethom richiethom added the kind/bug Something isn't working label Jul 9, 2020
@quarkusbot
Copy link

/cc @patriot1burke

@dpiotti
Copy link

dpiotti commented Jul 12, 2020

I am also trying to use this feature and the context is returning null

@dpiotti
Copy link

dpiotti commented Jul 12, 2020

Do you suggest an alternative way to get the request context?

@patriot1burke
Copy link
Contributor

@dpiotti Yes, don't use Funqy, use Quarkus Amazon Lambda integration. Funqy is supposed to be cross-platform and independent of Amazon APIs. I gotta fix the docs. Should never have put that example in.

@jaikiran
Copy link
Member

The PR improving this documentation has been merged recently #10693. Closing this issue. Please re-open or create a new one if there's still some confusion around the usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/funqy kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants