question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quarkus + Resteasy + Google Cloud Functions: no query parameters bypass

See original GitHub issue

Describe the bug I’m trying to implement a simple service using Google Cloud Functions and Quarkus. But if I’m trying to use @QueryParam annotation I’m getting nulls in any param. E.G.:

	@GET
	@Path("echo1")
	@Produces(MediaType.TEXT_PLAIN)
	public Response echo1(@QueryParam("test") String test) {
		return Response.status(Response.Status.OK)
				.encoding("UTF-8")
				.entity("test: " + test).build();
	}

Expected behavior

test: test string

Actual behavior

test: null

To Reproduce I’ve implemented a very small test service to reproduce the issue: https://github.com/HardNorth/quarkus-google-functions-test/blob/main/src/main/java/net/hardnorth/test/quarkus/QuarkusTestService.java

You need to deploy it into Google Cloud. Because it works locally.

Configuration Doesn’t matter at all

Additional context Based on what I see from code there is a missing part in QuarkusHttpFunction.java. E.G. for Amazon lambdas you have a whole loop which appends query parameters to path variable: https://github.com/quarkusio/quarkus/blob/master/extensions/amazon-lambda-rest/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java#L154

But there is no such logic for Google Functions: https://github.com/quarkusio/quarkus/blob/master/extensions/google-cloud-functions-http/runtime/src/main/java/io/quarkus/gcp/functions/http/QuarkusHttpFunction.java#L94

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Quarkus + Resteasy + Google Cloud Functions: status code ...
Quarkus + Resteasy + Google Cloud Functions: no query parameters ... Fixes Google cloud functions HTTP query params and status code bypass # ......
Read more >
Google Cloud Functions (Serverless) with RESTEasy ...
The quarkus-google-cloud-functions-http extension allows you to write microservices with RESTEasy Reactive (JAX-RS), Undertow (Servlet), Reactive Routes, or ...
Read more >
Google Cloud Functions (Serverless) - Quarkus
This command will give you as output a httpsTrigger.url that points to your function. The BackgroundFunction. Before deploying your function, you need to...
Read more >
All configuration options - Quarkus
AWS Lambda Type Default AWS Lambda Common Type Default AWS Lambda Gateway REST API Type Default Agroal ‑ Database connection pool Type Default
Read more >
Funqy Google Cloud Functions - Quarkus
This is a background function that takes as parameter a io.quarkus.funqy.gcp.functions.event.PubsubMessage , this is a convenient class to deserialize a PubSub ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found