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

Dev UI endpoint list rendering issue with reactive routes #20685

Closed
dvddhln opened this issue Oct 12, 2021 · 9 comments · Fixed by #20692
Closed

Dev UI endpoint list rendering issue with reactive routes #20685

dvddhln opened this issue Oct 12, 2021 · 9 comments · Fixed by #20692
Assignees
Labels
area/dev-ui kind/bug Something isn't working
Milestone

Comments

@dvddhln
Copy link

dvddhln commented Oct 12, 2021

Describe the bug

Excerpt from Zulip chat

Hi all, currently when using 2.3.0.Final and reactive endpoint I get a long stack trace when trying to enter the
the dev ui endpoint "q/dev/io.quarkus.quarkus-resteasy-reactive/endpoints". Not sure if this case is supported though.

Below is the stack trace of the result.

Expected behavior

Expected to see list of endpoint for reactive routes.

Actual behavior

io.quarkus.qute.TemplateException: Property "endpointScores" not found on the base object "null" in expression {info:endpointScores.endpoints} in template io.quarkus.quarkus-resteasy-reactive/endpoints on line 16
	at io.quarkus.qute.EvaluatorImpl.propertyNotFound(EvaluatorImpl.java:207)
	at io.quarkus.qute.EvaluatorImpl.resolve(EvaluatorImpl.java:168)
	at io.quarkus.qute.EvaluatorImpl.resolveReference(EvaluatorImpl.java:112)
	at io.quarkus.qute.EvaluatorImpl.lambda$evaluate$0(EvaluatorImpl.java:66)
	at io.quarkus.qute.CompletedStage.thenCompose(CompletedStage.java:228)
	at io.quarkus.qute.EvaluatorImpl.evaluate(EvaluatorImpl.java:64)
	at io.quarkus.qute.ResolutionContextImpl$ChildResolutionContext.evaluate(ResolutionContextImpl.java:86)
	at io.quarkus.qute.LoopSectionHelper.resolve(LoopSectionHelper.java:40)
	at io.quarkus.qute.SectionNode.resolve(SectionNode.java:34)
	at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:153)
	at io.quarkus.qute.InsertSectionHelper.resolve(InsertSectionHelper.java:20)
	at io.quarkus.qute.SectionNode.resolve(SectionNode.java:34)
	at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:153)
	at io.quarkus.qute.SectionHelper$SectionResolutionContext.execute(SectionHelper.java:37)
	at io.quarkus.qute.Parser$1.resolve(Parser.java:1014)
	at io.quarkus.qute.SectionNode.resolve(SectionNode.java:34)
	at io.quarkus.qute.IncludeSectionHelper.resolve(IncludeSectionHelper.java:34)
	at io.quarkus.qute.SectionNode.resolve(SectionNode.java:34)
	at io.quarkus.qute.SectionNode$SectionResolutionContextImpl.execute(SectionNode.java:149)
	at io.quarkus.qute.SectionHelper$SectionResolutionContext.execute(SectionHelper.java:37)
	at io.quarkus.qute.Parser$1.resolve(Parser.java:1014)
	at io.quarkus.qute.SectionNode.resolve(SectionNode.java:34)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderData(TemplateImpl.java:104)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.renderAsync(TemplateImpl.java:90)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.renderTemplate(DevConsole.java:153)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.handle(DevConsole.java:117)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.handle(DevConsole.java:36)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1127)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
	at io.quarkus.vertx.http.deployment.devmode.console.FlashScopeHandler.handle(FlashScopeHandler.java:12)
	at io.quarkus.vertx.http.deployment.devmode.console.FlashScopeHandler.handle(FlashScopeHandler.java:7)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1127)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
	at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:236)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1127)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:55)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$2$1.handle(DevConsoleProcessor.java:203)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$2$1.handle(DevConsoleProcessor.java:200)
	at io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:50)
	at io.vertx.core.impl.EventLoopContext.lambda$emit$1(EventLoopContext.java:57)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)
Resulted in: io.quarkus.qute.TemplateException
	at io.quarkus.qute.CompletedStage.get(CompletedStage.java:44)
	at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:20)
	at io.quarkus.qute.MultiResultNode.process(MultiResultNode.java:20)
	at io.quarkus.qute.TemplateImpl$TemplateInstanceImpl.lambda$renderData$3(TemplateImpl.java:110)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:883)
	at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2251)
	at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:143)
	... 30 more
Resulted in: java.util.concurrent.CompletionException: io.quarkus.qute.TemplateException
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:670)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:658)
	at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2094)
	at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:143)
	... 29 more

How to Reproduce?

Reproducer

  1. git clone https://github.com/dvddhln/reactive-routes-qute-reproducer
  2. ./gradlew quarkusDev
  3. Go to http://localhost:8080/q/dev/io.quarkus.quarkus-resteasy-reactive/endpoints

Output of uname -a or ver

No response

Output of java -version

11

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.3.0.Final

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

7.2

Additional information

Extensions used

implementation 'io.quarkus:quarkus-arc'
implementation 'io.quarkus:quarkus-vertx-web'
implementation 'io.quarkus:quarkus-resteasy-reactive'
implementation 'io.quarkus:quarkus-resteasy-reactive-jackson'
implementation 'io.quarkus:quarkus-config-yaml'
implementation 'io.quarkus:quarkus-smallrye-openapi'
@dvddhln dvddhln added the kind/bug Something isn't working label Oct 12, 2021
@geoand
Copy link
Contributor

geoand commented Oct 12, 2021

Although it's definitely a bug that the UI displays this exception, Reactive Routes do not shows up in the list of RESTEasy Reactive endpoints.

@geoand geoand self-assigned this Oct 12, 2021
@dvddhln
Copy link
Author

dvddhln commented Oct 12, 2021

Right, maybe I was confused to whether or not this is a valid case, so RESTeasy reactive endpoints have nothing with reactive routes to do?

@geoand
Copy link
Contributor

geoand commented Oct 12, 2021

Correct, Reactive Routes (which are being phased out) have nothing to do with RESTEasy Reactive

@dvddhln
Copy link
Author

dvddhln commented Oct 12, 2021

Interesting, I didn't know they were being phased out, just been following the reactive routes guide. When can one expect to see more extensive documentation around this?

@geoand
Copy link
Contributor

geoand commented Oct 12, 2021

@cescoffier ^

geoand added a commit that referenced this issue Oct 12, 2021
Prevent ugly stacktrace in DevUI when no RESTEasy Reactive endpoints exist
@quarkus-bot quarkus-bot bot added this to the 2.5 - main milestone Oct 12, 2021
@cescoffier
Copy link
Member

Do you mean indicating the deprecation? Or do you have something in mind?

Note that reactive routes are getting replaced with RestEasy reactive, but the router api is still valid (actually everything goes through that layer).

@dvddhln
Copy link
Author

dvddhln commented Oct 12, 2021

Yes, something about the deprecation. I was kind of liking the reactive route approach so that’s why I ask.

@mkouba
Copy link
Contributor

mkouba commented Oct 13, 2021

Yes, something about the deprecation. I was kind of liking the reactive route approach so that’s why I ask.

AFAIK it's not going to disappear but it was put in the maintenance mode.

@dvddhln
Copy link
Author

dvddhln commented Oct 13, 2021

Thanks for quick responses @mkouba and @cescoffier , I will leave the extensions out for now in my application since they are not needed for the reactive routes.

@aloubyansky aloubyansky modified the milestones: 2.5 - main, 2.4.0.Final Oct 18, 2021
aloubyansky pushed a commit to aloubyansky/quarkus that referenced this issue Oct 18, 2021
@gsmet gsmet modified the milestones: 2.4.0.Final, 2.3.1.Final Oct 18, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ui kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants