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

There's no way to disable Flyway for a specific datasource #35924

Closed
Lucas-Bruschi opened this issue Sep 13, 2023 · 2 comments
Closed

There's no way to disable Flyway for a specific datasource #35924

Lucas-Bruschi opened this issue Sep 13, 2023 · 2 comments
Labels
area/flyway env/windows Impacts Windows machines kind/bug Something isn't working triage/duplicate This issue or pull request already exists

Comments

@Lucas-Bruschi
Copy link

Describe the bug

Recently I migrated to the Quarkus 3.x.x version.
I'm getting this error, that didn't happen before: "org.flywaydb.core.api.FlywayException: Unsupported Database: SQL Anywhere 16.0" .
Yes I know that is not supported, but I didn't enabled the feature for this datasource in the first place. I only want to use it for my other datasource.
I explicitly added "quarkus.flyway.datasourcename.enabled=false", but the same error keeps preventing the application to start.

Expected behavior

Propertie to disable Flyway for a specific datasource.

Actual behavior

There's no option to disable Flyway for a specific datasource, or the option is being ignored.

How to Reproduce?

  1. Configure 2 or more datatsources, one of them being unsupported by the Flyway migration tool.
  2. Add the Flyway config options only to the supported datasource.
  3. Try to run the application.
  4. Try to add "quarkus.flyway."datasource".enabled=false" to application properties
  5. Try to run again.

Output of uname -a or ver

No response

Output of java -version

openjdk 17.0.5 2022-10-18 LTS OpenJDK Runtime Environment Corretto-17.0.5.8.1 (build 17.0.5+8-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.5.8.1 (build 17.0.5+8-LTS, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.3.2

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

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: C:\Users\lucas.m2\wrapper\dists\apache-maven-3.8.4-bin\52ccbt68d252mdldqsfsn03jlf\apache-maven-3.8.4 Java version: 17.0.5, vendor: Amazon.com Inc., runtime: C:\Program Files\Amazon Corretto\jdk17.0.5_8 Default locale: en_US, platform encoding: Cp1252 OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

Additional information

Console output:

023-09-13 20:14:38,149 INFO [io.qua.sma.dep.processor] (build-18) Generating Jackson deserializer for type com.gestorsistemas.chupacabra.base.common.dto.SystemUpdateDto
2023-09-13 20:14:38,154 INFO [io.qua.sma.dep.processor] (build-18) Generating Jackson deserializer for type com.gestorsistemas.chupacabra.base.common.dto.CollectorRequest
2023-09-13 20:14:38,158 INFO [io.qua.sma.dep.processor] (build-18) Generating Jackson serializer for type com.gestorsistemas.chupacabra.dominio.dto.CompanyResponse
2023-09-13 20:14:38,159 INFO [io.qua.sma.dep.processor] (build-18) Generating Jackson serializer for type com.gestorsistemas.chupacabra.base.domain.invoicemirror.invoice.dto.InvoiceResponse
2023-09-13 20:14:38,160 INFO [io.qua.sma.dep.processor] (build-18) Generating Jackson serializer for type com.gestorsistemas.chupacabra.dominio.dto.pgdas.PgdasDto


--/ __ / / / / _ | / _ / /// / / / __/
-/ /
/ / // / __ |/ , / ,< / // /\ \
--___
// |//|//||_//
2023-09-13 20:14:40,169 INFO [io.und.websockets] (Quarkus Main Thread) UT026004: Adding annotated client endpoint class com.gestorsistemas.chupacabra.base.api.client.websocket.NotificationWSClient
2023-09-13 20:14:40,557 INFO [com.ges.chu.bas.api.cli.web.NotificationEncoder] (nioEventLoopGroup-2-1) Initializing message encoder
2023-09-13 20:14:40,557 INFO [com.ges.chu.bas.api.cli.web.NotificationDecoder] (nioEventLoopGroup-2-1) Initializing message decoder
2023-09-13 20:14:40,834 INFO [com.ges.chu.bas.sys.upd.SystemUpdateService] (Quarkus Main Thread) Initiating application update
2023-09-13 20:14:40,834 INFO [com.ges.chu.bas.sys.upd.SystemUpdateService] (Quarkus Main Thread) Application is already up to date. Version: 0.25.0
2023-09-13 20:14:40,953 WARN [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.datasource.dominio.jdbc.timezone" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2023-09-13 20:14:40,953 WARN [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.flyway.dominio.enabled" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2023-09-13 20:14:40,953 WARN [io.qua.config] (Quarkus Main Thread) Unrecognized configuration key "quarkus.datasource.mirror.jdbc.timezone" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2023-09-13 20:14:41,257 WARN [org.hib.dia.Dialect] (Quarkus Main Thread) HHH000511: The 8.0.0 version for [org.hibernate.community.dialect.SybaseAnywhereDialect] is no longer supported, hence certain features may not work properly. The minimum supported version is 16.0.0. Check the community dialects project for available legacy versions.
2023-09-13 20:14:41,594 INFO [io.und.websockets] (Quarkus Main Thread) UT026004: Adding annotated client endpoint class com.gestorsistemas.chupacabra.base.api.client.websocket.NotificationWSClient
2023-09-13 20:14:42,059 INFO [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) Flyway Community Edition 9.21.0 by Redgate
2023-09-13 20:14:42,060 INFO [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) See release notes here: https://rd.gt/416ObMi
2023-09-13 20:14:42,060 INFO [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread)
2023-09-13 20:14:42,066 INFO [org.fly.cor.int.dat.bas.BaseDatabaseType] (Quarkus Main Thread) Database: jdbc:h2:file:./mirror (H2 2.2)
2023-09-13 20:14:42,098 WARN [org.fly.cor.int.dat.bas.Database] (Quarkus Main Thread) Flyway upgrade recommended: H2 2.2.220 is newer than this version of Flyway and support has not been tested. The latest supported version of H2 is 2.1.214.
2023-09-13 20:14:42,114 INFO [org.fly.cor.int.sch.JdbcTableSchemaHistory] (Quarkus Main Thread) Schema history table "PUBLIC"."flyway_schema_history" does not exist yet
2023-09-13 20:14:42,116 INFO [org.fly.cor.int.com.DbValidate] (Quarkus Main Thread) Successfully validated 7 migrations (execution time 00:00.011s)
2023-09-13 20:14:42,119 INFO [org.fly.cor.int.sch.JdbcTableSchemaHistory] (Quarkus Main Thread) Creating Schema History table "PUBLIC"."flyway_schema_history" ...
2023-09-13 20:14:42,134 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Current version of schema "PUBLIC": << Empty Schema >>
2023-09-13 20:14:42,140 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.0.2 - seed"
2023-09-13 20:14:42,154 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.1.0 - seed"
2023-09-13 20:14:42,161 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.2.0 - seed"
2023-09-13 20:14:42,172 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.3.0 - seed"
2023-09-13 20:14:42,175 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.4.0 - seed"
2023-09-13 20:14:42,178 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.5.0 - seed"
2023-09-13 20:14:42,184 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "PUBLIC" to version "1.6.0 - seed"
2023-09-13 20:14:42,193 INFO [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Successfully applied 7 migrations to schema "PUBLIC", now at version v1.6.0 (execution time 00:00.030s)
2023-09-13 20:14:42,194 WARN [io.qua.agr.run.AgroalConnectionConfigurer] (Quarkus Main Thread) Agroal does not support detecting if a connection is still usable after an exception for database kind: other
2023-09-13 20:14:43,541 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile [dev]): java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at com.gestorsistemas.chupacabra.dominio.Main.initializeApplication(Main.java:35)
at com.gestorsistemas.chupacabra.dominio.Main.main(Main.java:22)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:104)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: jakarta.enterprise.inject.CreationException: Error creating synthetic bean [01b08b875034eeabb30647eba997f414359895a9]: org.flywaydb.core.api.FlywayException: Unsupported Database: SQL Anywhere 16.0
at io.quarkus.flyway.runtime.FlywayContainer_01b08b875034eeabb30647eba997f414359895a9_Synthetic_Bean.doCreate(Unknown Source)
at io.quarkus.flyway.runtime.FlywayContainer_01b08b875034eeabb30647eba997f414359895a9_Synthetic_Bean.create(Unknown Source)
at io.quarkus.flyway.runtime.FlywayContainer_01b08b875034eeabb30647eba997f414359895a9_Synthetic_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:113)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:37)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:34)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:32)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:34)
at io.quarkus.flyway.runtime.FlywayContainer_01b08b875034eeabb30647eba997f414359895a9_Synthetic_Bean.get(Unknown Source)
at io.quarkus.flyway.runtime.FlywayContainer_01b08b875034eeabb30647eba997f414359895a9_Synthetic_Bean.get(Unknown Source)
at io.quarkus.arc.impl.Instances$3.get(Instances.java:132)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:32)
at io.quarkus.arc.impl.LazyInstanceHandle.instanceInternal(LazyInstanceHandle.java:32)
at io.quarkus.arc.impl.AbstractInstanceHandle.get(AbstractInstanceHandle.java:46)
at io.quarkus.flyway.runtime.FlywayRecorder.doStartActions(FlywayRecorder.java:96)
at io.quarkus.deployment.steps.FlywayProcessor$startActions2035800939.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.FlywayProcessor$startActions2035800939.deploy(Unknown Source)
... 13 more
Caused by: org.flywaydb.core.api.FlywayException: Unsupported Database: SQL Anywhere 16.0
at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForConnection(DatabaseTypeRegister.java:105)
at org.flywaydb.core.api.configuration.ClassicConfiguration.setDataSource(ClassicConfiguration.java:1079)
at org.flywaydb.core.api.configuration.FluentConfiguration.dataSource(FluentConfiguration.java:614)
at io.quarkus.flyway.runtime.FlywayCreator.createFlyway(FlywayCreator.java:71)
at io.quarkus.flyway.runtime.FlywayContainerProducer.createFlyway(FlywayContainerProducer.java:53)
at io.quarkus.flyway.runtime.FlywayRecorder$1.apply(FlywayRecorder.java:66)
at io.quarkus.flyway.runtime.FlywayRecorder$1.apply(FlywayRecorder.java:57)
at io.quarkus.flyway.runtime.FlywayContainer_01b08b875034eeabb30647eba997f414359895a9_Synthetic_Bean.createSynthetic(Unknown Source)
... 31 more

@Lucas-Bruschi Lucas-Bruschi added the kind/bug Something isn't working label Sep 13, 2023
@quarkus-bot quarkus-bot bot added area/flyway env/windows Impacts Windows machines labels Sep 13, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 13, 2023

/cc @cristhiank (flyway), @gastaldi (flyway), @geoand (flyway), @gsmet (flyway)

@geoand
Copy link
Contributor

geoand commented Sep 14, 2023

This is essentially a duplicate of #35528 and @gsmet has a fix in the works for it

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2023
@geoand geoand added the triage/duplicate This issue or pull request already exists label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/flyway env/windows Impacts Windows machines kind/bug Something isn't working triage/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants