Skip to content

Conversation

@dquintela
Copy link

… from a windows machine

Testing with version 1.5.0.CR1 (also happening with 1.4.2.Final)

When triggering the native-build from the a windows machine, the included native resource has left slashes triggering the test in io.quarkus.flyway.runtime.graal.QuarkusPathLocationScanner#canHandleMigrationFile to fail and so native-image doesn't run any migrations.

Log:
2020-05-23 15:12:42,725 INFO [org.fly.cor.int.dat.DatabaseFactory] (main) Database: jdbc:postgresql://192.168.10.66:5432/audit_db (PostgreSQL 10.5)
2020-05-23 15:12:42,761 INFO [org.fly.cor.int.com.DbMigrate] (main) Current version of schema "public": 1.0.0.00
2020-05-23 15:12:42,761 WARN [org.fly.cor.int.com.DbMigrate] (main) Schema "public" has version 1.0.0.00, but no migration could be resolved in the configured locations ! Note this warning will become an error in Flyway 7.
2020-05-23 15:12:42,763 INFO [org.fly.cor.int.com.DbMigrate] (main) Schema "public" is up to date. No migration necessary.

Simple debug of included resources:
[INFO] [org.hibernate.Version] HHH000412: Hibernate ORM core version 5.4.16.Final
++: NativeImageAutoFeatureStep
j=META-INF/services/io.agroal.api.security.AgroalSecurityProvider
j=db\migration\V1_0_0_00__Initial.sql
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui.js.gz
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui-bundle.js
j=META-INF/resources/webjars/swagger-ui/3.25.0/index.html.gz
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui.js.map
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui.css.gz
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui.js
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui-standalone-preset.js.map
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui-bundle.js.gz
j=META-INF/resources/webjars/swagger-ui/3.25.0/index.html
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui.css
j=META-INF/resources/webjars/swagger-ui/3.25.0/favicon-32x32.png
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui-bundle.js.map
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui-standalone-preset.js.gz
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui-standalone-preset.js
j=META-INF/resources/index.html
j=META-INF/resources/webjars/swagger-ui/3.25.0/oauth2-redirect.html
j=META-INF/resources/webjars/swagger-ui/3.25.0/favicon-16x16.png
j=META-INF/resources/webjars/swagger-ui/3.25.0/oauth2-redirect.html.gz
j=META-INF/resources/webjars/swagger-ui/3.25.0/swagger-ui.css.map
j=META-INF/services/javax.ws.rs.client.ClientBuilder
j=META-INF/quarkus-generated-openapi-doc.JSON
j=META-INF/quarkus-generated-openapi-doc.YAML
--: NativeImageAutoFeatureStep

@geoand
Copy link
Contributor

geoand commented May 24, 2020

Hi,

Thanks a lot for this PR!

The same fix has already been applied in #9531.
If we decide to merge that one, we can close this. If however we decide that we don't want that one, I'll go ahead and merge this PR.

@dquintela
Copy link
Author

Hi Georgios,

Thank you for the comment. Indeed, after I've opened the MR/PR, I noticed the same fix was applied there - that could have saved me some time..

But this is purely an hotfix and could be safely applied to 1.5 branch (master) and 1.4.x branch.

@geoand
Copy link
Contributor

geoand commented May 24, 2020

We most likely won't be doing any more 1.4.x releases, but you made a good point that this should be included in 1.5.0.Final, so lets merge now and I'll rebase my PR onto it.

@geoand geoand merged commit bcbbbdc into quarkusio:master May 24, 2020
@gsmet gsmet changed the title Fix flyway resource inclusion in native image when build is triggered… Fix flyway resource inclusion in native image when build is triggered from a Windows machine May 26, 2020
@gsmet gsmet added this to the 1.5.0.Final milestone May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants