Open FroMage opened 1 year ago
/cc @gwenneg (cache)
@cescoffier @tsegismont any idea how to assign this to?
@FroMage does quarkus dev mode, also activate vertx web dev mode?
@pmlopes a pointer on how it's supposed to be done? It will be easier to check. Thanks!
@gsmet @FroMage You might also be interested in https://vertx.io/docs/vertx-web/java/#_disabling_file_caching_on_disk
@FroMage could you check if setting quarkus.vertx.caching=false
solves your issue?
If so we need to decide if we want to make it the default in dev mode. From what I can see, it defaults to true
and we don't force it to false
in dev mode.
/cc @cescoffier
So, I confirm that quarkus.vertx.caching=false
solves my original issue, which I haven't been able to properly write a test for. But it doesn't solve the issue I described here with the reproducer.
Describe the bug
Static resources are served with
StaticHandler
from Vert.x, which sometimes need to be loaded from the QuarkusClassLoader or from the classpath. This is accomplished viaFileResolverImpl
which uses aFileCache
to extract things from zips/jars, but also copy directories and their contents to a cache folder under/tmp/vertx-cache
.Under some circumstances, it is possible to trigger caching a folder such as
META-INF/resources
containinga.txt
andb.txt
, then usingQuarkusDevModeTest.deleteResourceFile
to deletea.txt
and the cache doesn't see it, so it will keep serving it.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
This causes:
Which is a bit weird, but caused by adding
b.txt
and deletinga.txt
. I've seen other symptoms of this bug, this is not the most common. The most common is keeping on serving a file after we've deleted it. But this is all due to theFileCache
not being reset in DEV/TEST modes after the FS has changed, when no full reload has happened.Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response