You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next hurdle is the native image generation that will fail on the /tmp/jib-core-application-layers-cache being owned by the other user. That is actually a jib bug.
Koekebakkert
changed the title
Impossible to build Quarkus applications with multiple Quarkus developers on the same machine
Provide support to build Quarkus applications with multiple Quarkus developers on the same machine
Dec 24, 2021
This is due to WebJarUtil copying files to /tmp/quarkus. I think we need a better strategy here, probably by creating a specific temp directory for each instance but we need to make sure it's correctly cleaned up when shut down.
Also there are all sorts of specific rules for dev mode and live reload so this needs to be carefully crafted.
@gsmet This one is quite interesting. On Windows, the generated directory for webjar content is e.g. C:/User/martin/Appdata/Local/Temp/quarkus/....
WebJarUtil however simply uses System.getProperty("java.io.tmpdir"); to determine the temp dir, which might point on linux to anywhere outside the user dir.
I will take a look at this, since I just recently made changes to WebJarUtil anyway.
Yeah, unfortunately on Linux, the temp directory is global so you end up with /tmp/quarkus for all users.
So my guess is that we would need to create directories with Files.createTempDirectory("quarkus-resources-") and use this directory for all resources and register a shutdown hook to delete it.
But it's going to be a bit more cumbersome than that given how things are done.
Describe the bug
Quarkus stores temporary files in /tmp/quarkus during test that are owned by the first Quarkus user on the machine.
Any other user will receive a java.nio.file.AccessDeniedException: /tmp/quarkus/... error that fails his/her builds in maven test phase.
Expected behavior
Quarkus creates a /tmp/quarkus-$USER directory in maven test phase that is owned by that $USER.
Actual behavior
Quarkus creates a /tmp/quarkus directory owned by the first Quarkus user on the machine.
How to Reproduce?
sudo rm -rf /tmp/quarkus
mvn test
mvn test
, this will generate a java.nio.file.AccessDeniedException and fail the build.Output of
uname -a
orver
Linux tr-o-dev-5.intravialis.nl 5.15.8-1-default #1 SMP Wed Dec 15 08:12:54 UTC 2021 (0530e5c) x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment (build 11.0.13+8-suse-2.2-x8664) OpenJDK 64-Bit Server VM (build 11.0.13+8-suse-2.2-x8664, mixed mode)
GraalVM version (if different from Java)
Tested with 21+
Quarkus version or git rev
Tested with 2.1.0.Final up to 2.6.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Additional information
See expected behaviour.
The text was updated successfully, but these errors were encountered: