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

Regression: Quarkus 2.6.0.CR1 build with Flyway without generate-code #22130

Closed
jorsol opened this issue Dec 12, 2021 · 2 comments
Closed

Regression: Quarkus 2.6.0.CR1 build with Flyway without generate-code #22130

jorsol opened this issue Dec 12, 2021 · 2 comments
Labels
area/flyway kind/bug Something isn't working

Comments

@jorsol
Copy link
Contributor

jorsol commented Dec 12, 2021

Describe the bug

If I configure the flyway extension but the quarkus-maven-plugin doesn't have the generate-code goal, the build fails.

With the generate-code goal the output is the following:

[INFO] [io.quarkus.flyway.FlywayProcessor] Adding application migrations in path '/home/quarkus/code-with-quarkus/target/classes/db/migration/' using protocol 'file'

Without the generate-code goal the output is the following:

[INFO] [io.quarkus.flyway.FlywayProcessor] Adding application migrations in path 'file:/home/quarkus/code-with-quarkus/target/code-with-quarkus-1.0.0-SNAPSHOT.jar!/db/migration/' using protocol 'jar'

Note the difference in how it reads the path using the protocol jar.

As far I know, the generate-code is used for GRPC and Avro, which I don't currently use, so it should be optional (unless I'm missing something).

I don't mind having the generate-code goal enabled, but this probably should not affect the build of an application that doesn't require it.

Expected behavior

Build normally

Actual behavior

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.6.0.CR1:build (default) on project code-with-quarkus: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.flyway.FlywayProcessor#build threw an exception: java.nio.file.FileSystemNotFoundException
[ERROR] 	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:156)
[ERROR] 	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:142)
[ERROR] 	at java.base/java.nio.file.Path.of(Path.java:208)
[ERROR] 	at io.quarkus.flyway.FlywayProcessor.initFileSystem(FlywayProcessor.java:284)
[ERROR] 	at io.quarkus.flyway.FlywayProcessor.discoverApplicationMigrations(FlywayProcessor.java:230)
[ERROR] 	at io.quarkus.flyway.FlywayProcessor.build(FlywayProcessor.java:99)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

How to Reproduce?

  1. quarkus create app --platform-bom=io.quarkus.platform:quarkus-bom:2.6.0.CR1 --extension=flyway,jdbc-postgresql
  2. cd code-with-quarkus
  3. mkdir -p src/main/resources/db/migration
  4. touch src/main/resources/db/migration/V1_demo.sql
  5. sed -i '/<goal>generate-code.*<\/goal>/d' pom.xml # Delete the generate-code goals
  6. mvn clean package -DskipTests

Output of uname -a or ver

Linux quarkus 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.6.0.CR1

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

Apache Maven 3.8.4

Additional information

No response

@jorsol jorsol added the kind/bug Something isn't working label Dec 12, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 12, 2021

/cc @cristhiank, @gastaldi, @geoand, @gsmet

@gsmet
Copy link
Member

gsmet commented Dec 12, 2021

Thanks for reporting. This has already been fixed and the fix will be part of 2.6.0.Final.

#22083

@gsmet gsmet closed this as completed Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/flyway kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants