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

Build fails with Quarkus 3.9.5+ and Web Bundler due to Qute Processor #197

Closed
nanobreaker opened this issue Apr 30, 2024 · 16 comments
Closed

Comments

@nanobreaker
Copy link

nanobreaker commented Apr 30, 2024

Hey yo!

I just upgraded my project to Quarkus version 3.9.5 and got into the problem with web-bundler on build stage. Also tried with the code.quarkus.io and experienced same problem, used REST Qute + Web Bundler, it has even newer version at 3.10.0.

Here is the actual error and further discovery

Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.qute.deployment.QuteProcessor#collectTemplates threw an exception: java.lang.IllegalArgumentException
        at jdk.zipfs/jdk.nio.zipfs.ZipPath.relativize(ZipPath.java:248)
        at io.quarkus.qute.deployment.QuteProcessor.lambda$scanTemplateRootSubtree$12(QuteProcessor.java:3394)
        at io.quarkus.paths.FilteredPathTree.lambda$walk$0(FilteredPathTree.java:35)
        at io.quarkus.paths.PathTreeVisit.walk(PathTreeVisit.java:25)
        at io.quarkus.paths.ArchivePathTree.walk(ArchivePathTree.java:98)
        at io.quarkus.paths.FilteredPathTree.walk(FilteredPathTree.java:33)
        at io.quarkus.qute.deployment.QuteProcessor.scanTemplateRootSubtree(QuteProcessor.java:3391)
        at io.quarkus.qute.deployment.QuteProcessor.lambda$scanPathTree$7(QuteProcessor.java:2171)
        at io.quarkus.paths.PathTreeVisit.consume(PathTreeVisit.java:47)
        at io.quarkus.paths.ArchivePathTree.accept(ArchivePathTree.java:147)
        at io.quarkus.qute.deployment.QuteProcessor.scanPathTree(QuteProcessor.java:2168)
        at io.quarkus.qute.deployment.QuteProcessor.collectTemplates(QuteProcessor.java:2152)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        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.doRunWith(EnhancedQueueExecutor.java:2516)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
        at java.base/java.lang.Thread.run(Thread.java:1583)
        at org.jboss.threads.JBossThread.run(JBossThread.java:483)

I did a little bit of debugging and found out that it fails on the call to the jdk.nio.zipfs.ZipPath.relativize, files come from different zfss.
image

Are there any temporal solutions/clues at this moment to solve the issue?

UPDATE I
I found a related topic, looks like something similar had place in the past quarkusio/quarkus#25751

UPDATE II
Found a link to recent refactoring in that area quarkusio/quarkus@6014d51

Kind regards

@ia3andy
Copy link
Contributor

ia3andy commented Apr 30, 2024

@mkouba any thought?

@nanobreaker
Copy link
Author

I'm wondering what is the logic behind the qute processing, is that okey to compare relative paths of the files that are located within different zips?

@ia3andy
Copy link
Contributor

ia3andy commented Apr 30, 2024

@mkouba made Qute so I am pretty sure he will know how to fix this :)

@faermanj
Copy link

faermanj commented May 1, 2024

Same issue here, rolling back to 3.9.4 which is latest working for us.

@ia3andy
Copy link
Contributor

ia3andy commented May 1, 2024

@gsmet @geoand any idea of what this could be, many impacted users it seems.

@ia3andy
Copy link
Contributor

ia3andy commented May 1, 2024

I would suspect that fix: quarkusio/quarkus#40158

@nanobreaker
Copy link
Author

I've tested code-with-quarkus on version 3.10.0.CR1 and no build issues there!

So @ia3andy indeed fix is on it's way! I guess we can close this one.

@ia3andy
Copy link
Contributor

ia3andy commented May 2, 2024

@ia3andy ia3andy reopened this May 2, 2024
@ia3andy
Copy link
Contributor

ia3andy commented May 2, 2024

@nanobreaker the issue I mentioned before is what caused the error, not the fix. It might be already fixed on main, but we need to find exactly what fixed it to be sure it doesn't happen again. Also we might need to backport the fix.

I'll make sure to enable the ecosystem-ci with quarkus main to make sure this kind of bug is catched earlier..

@aloubyansky
Copy link
Member

@aloubyansky this looks related right? https://github.com/quarkusio/quarkus/pull/40400/files

Right, do we have a reproducer?

@ia3andy
Copy link
Contributor

ia3andy commented May 2, 2024

@aloubyansky
Copy link
Member

Just a note, that link needs rest-qute, instead of rest to reproduce the issue. The good news is my PR fixes it.

@ia3andy
Copy link
Contributor

ia3andy commented May 2, 2024

Let's close it when it's released and working then. Thanks @aloubyansky this is a great news

@ia3andy
Copy link
Contributor

ia3andy commented May 2, 2024

@all-contributors please add @nanobreaker for bug

Copy link
Contributor

@ia3andy

I've put up a pull request to add @nanobreaker! 🎉

@ia3andy
Copy link
Contributor

ia3andy commented May 27, 2024

@faermanj @nanobreaker this is fixed in latest Quarkus AFAIK

@ia3andy ia3andy closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants