any reason root-path can't be runtime?

389 views
Skip to first unread message

William Burke

unread,
May 10, 2021, 8:45:22 AM5/10/21
to Quarkus Development mailing list
Is there any reason quarkus.http.root-path has to be fixed at build time and cannot be set by an ENV VAR?    A user ran into an issue with AWS Gateway deployment stages.  Seems that the deployment stage name changes the root path.  They have to recompile their apps when they change the stage.

--
Bill Burke
Red Hat

William Burke

unread,
May 10, 2021, 8:53:51 AM5/10/21
to Quarkus Development mailing list
I guess this would be an issue with Graal/native.  But no reason it couldn't work with JVM mode.

Georgios Andrianakis

unread,
May 10, 2021, 9:13:54 AM5/10/21
to William Burke, Quarkus Development mailing list
One reason is that we use that information to generate some build time resources, like the OpenAPI schema.
We also seem to use it to register various Vert.x handlers with build time information.

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAL%3DE%3DjTrvBBsSz-2kqH%3DbcWnaoSzUrfSGXQ8_uhz%2BtLSOCSQtQ%40mail.gmail.com.

Jonathan Roques

unread,
May 10, 2021, 11:04:22 AM5/10/21
to Quarkus Development mailing list
Hey, 

I'm the user Bill mentioned :) I got your point and it's a very valid one thank you for the explanation. It's just sad because I'm stuck with the quarkus lambda REST extension and won't be able to get the benefits of the HTTP one. 

Jason Greene

unread,
May 10, 2021, 11:17:33 AM5/10/21
to gand...@redhat.com, William Burke, Quarkus Development mailing list
I wonder if it makes sense to have an optional dynamic redispatch URL mapping (not a formal redirect, but a secondary dispatch). In this way the main tree is still fixed, but you have this intermediary than can remap into that fixed tree.

William Burke

unread,
May 10, 2021, 12:07:51 PM5/10/21
to Jason Greene, Georgios Andrianakis, Quarkus Development mailing list
I just find it weird that AWS changes root path based on dev stages.

Jason, the problem with redispatching is that your resources may be generating links.  You'd lose a bit of the link generating facilities of JAX-RS for instance if the root path isn't correct.

Jonathan Roques

unread,
May 10, 2021, 12:11:19 PM5/10/21
to Quarkus Development mailing list
Exactly, I mean the REST lambda extension works just well with stages, custom domains and so on - where the HTTP doesn't. FYI I also opened a ticket at aws github, asking why don't they provide the raw resource path : https://github.com/aws/aws-lambda-java-libs/issues/240 

David Lloyd

unread,
May 10, 2021, 12:18:13 PM5/10/21
to William Burke, Jason Greene, Georgios Andrianakis, Quarkus Development mailing list
Could the application be registered at both (or all?) paths statically?  And maybe capture that path segment to give the app an idea of which one was used, if necessary?



--
- DML • he/him

Jason Greene

unread,
May 10, 2021, 2:54:45 PM5/10/21
to William Burke, Georgios Andrianakis, Quarkus Development mailing list
Agree. Does it really require this? The docs speak of this as if it is a customizable template.

For example:

Jonathan Roques

unread,
May 11, 2021, 3:58:13 AM5/11/21
to Quarkus Development mailing list

@jason I'm sorry I don't get what you said by "does it really require this" ? 

Jonathan Roques

unread,
May 11, 2021, 3:58:43 AM5/11/21
to Quarkus Development mailing list
Do you mean that I should register "/dev/deals" "/prod/deals" and so on ? 

David Lloyd

unread,
May 11, 2021, 4:23:07 PM5/11/21
to jonatha...@clozzle.com, Quarkus Development mailing list
That was my thought. Granted it's been a while since I've messed with JAX-RS, but that seems like it could get around the problem.



--
- DML • he/him
Reply all
Reply to author
Forward
0 new messages