Skip to content

Commit 087231f

Browse files
geoandyrodiere
andauthored
Update extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java
Co-authored-by: Yoann Rodière <[email protected]>
1 parent 694a146 commit 087231f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,10 @@ private RunningDevService startDevDb(
243243
}
244244

245245
if (useSharedNetwork && dataSourceBuildTimeConfig.devservices().port().isPresent()) {
246-
log.warnf(
247-
"Port %d will be ignored as the Dev Service for datasource %s is using shared network port for datasource ",
248-
dataSourceBuildTimeConfig.devservices().port().getAsInt(), dataSourcePrettyName);
246+
throw new ConfigurationException(String.format(Locale.ROOT,
247+
"Cannot set a port for the Dev Service of datasource '%s' using '%s', because it is using a shared network, which disables port mapping",
248+
DataSourceUtil.dataSourcePropertyKey(dbName, "devservices.port"),
249+
dataSourcePrettyName));
249250
}
250251

251252
Boolean enabled = dataSourceBuildTimeConfig.devservices().enabled().orElse(!hasNamedDatasources);

0 commit comments

Comments
 (0)