quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.64k stars 2.65k forks source link

Qute suffix issue on hot reload #39514

Open gsmet opened 6 months ago

gsmet commented 6 months ago

@mkouba from time to time, when the Quarkus GitHub Bot is reloading with live reload, I end up having the following error:

Caused by: io.quarkus.qute.TemplateException: [WorkflowReportFormatter/checkRunReport.md] match the path WorkflowReportFormatter/checkRunReport but the file suffix is not configured via the quarkus.qute.suffixes property
    at io.quarkus.qute.deployment.QuteProcessor.collectCheckedTemplates(QuteProcessor.java:383)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
    at java.base/java.lang.Thread.run(Thread.java:840)
    at org.jboss.threads.JBossThread.run(JBossThread.java:501)

I have:

quarkus.qute.suffixes=md
quarkus.qute.content-types."md"=text/markdown

in the application.properties.

I wonder if we should make .md part of the default suffixes but still this is weird.

It is not reproducible always but when it does happen, you can't recover from it by pushing a new request.

quarkus-bot[bot] commented 6 months ago

/cc @mkouba (qute)

mkouba commented 6 months ago

Hm, this is weird. We could enhance the error message to also contain the TemplateFilePathsBuildItem.filePaths. But to be honest I have no idea what's going on...

gsmet commented 6 months ago

@mkouba yeah it's as if the config was somehow lost after hot reloading.

mkouba commented 1 week ago

@gsmet Is this still a problem?

It is not reproducible always but when it does happen, you can't recover from it by pushing a new request.

Are there any steps to reproduce?