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

Support MariaDB Dev Services in reactive-mysql-client #29894

Merged
merged 3 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ private RunningDevService startDevDb(String dbName,
boolean explicitlyDisabled = !(dataSourceBuildTimeConfig.devservices.enabled.orElse(true));
if (explicitlyDisabled) {
//explicitly disabled
log.debug("Not starting devservices for " + (dbName == null ? "default datasource" : dbName)
+ " as it has been disabled in the config");
log.debug("Not starting Dev Services for " + (dbName == null ? "default datasource" : dbName)
+ " as it has been disabled in the configuration");
return null;
}

Expand All @@ -222,8 +222,8 @@ private RunningDevService startDevDb(String dbName,
List<DevServicesDatasourceConfigurationHandlerBuildItem> configHandlers = configurationHandlerBuildItems
.get(defaultDbKind.get());
if (devDbProvider == null || configHandlers == null) {
log.warn("Unable to start devservices for " + (dbName == null ? "default datasource" : dbName)
+ " as this datasource type (" + defaultDbKind.get() + ") does not support devservices");
log.warn("Unable to start Dev Services for " + (dbName == null ? "default datasource" : dbName)
+ " as this datasource type (" + defaultDbKind.get() + ") does not support Dev Services");
return null;
}

Expand All @@ -232,7 +232,7 @@ private RunningDevService startDevDb(String dbName,
if (i.getCheckConfiguredFunction().test(dbName)) {
//this database has explicit configuration
//we don't start the devservices
log.debug("Not starting devservices for " + (dbName == null ? "default datasource" : dbName)
log.debug("Not starting Dev Services for " + (dbName == null ? "default datasource" : dbName)
+ " as it has explicit configuration");
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public String getEffectiveJdbcUrl() {
}

public String getReactiveUrl() {
return getEffectiveJdbcUrl().replaceFirst("jdbc:", "vertx-reactive:");
return getEffectiveJdbcUrl().replaceFirst("jdbc:mariadb:", "vertx-reactive:mysql:");
}
}
}
4 changes: 4 additions & 0 deletions extensions/reactive-mysql-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-devservices-mysql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-devservices-mariadb</artifactId>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
}

@BuildStep
DevServicesDatasourceConfigurationHandlerBuildItem devDbHandler() {
return DevServicesDatasourceConfigurationHandlerBuildItem.reactive(DatabaseKind.MYSQL);
List<DevServicesDatasourceConfigurationHandlerBuildItem> devDbHandler() {
return List.of(DevServicesDatasourceConfigurationHandlerBuildItem.reactive(DatabaseKind.MYSQL),
DevServicesDatasourceConfigurationHandlerBuildItem.reactive(DatabaseKind.MARIADB));
}

@BuildStep
Expand Down