Skip to content

Commit

Permalink
Fix DB devservice restart, issue #30390
Browse files Browse the repository at this point in the history
(cherry picked from commit a6e3cbf)
  • Loading branch information
alesj authored and gsmet committed Jan 17, 2023
1 parent 911f974 commit b03133e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

import org.eclipse.microprofile.config.ConfigProvider;
Expand Down Expand Up @@ -45,6 +46,10 @@ public class DevServicesDatasourceProcessor {
private static final Logger log = Logger.getLogger(DevServicesDatasourceProcessor.class);
private static final int DOCKER_PS_ID_LENGTH = 12;

// list of devservices properties we should not check for restart
// see issue #30390
private static final Set<String> EXCLUDED_PROPERTIES = Set.of("quarkus.datasource.devservices.enabled");

static volatile List<RunningDevService> databases;

static volatile Map<String, String> cachedProperties;
Expand Down Expand Up @@ -81,7 +86,7 @@ DevServicesDatasourceResultBuildItem launchDatabases(CurateOutcomeBuildItem cura
//devservices properties may have been added
for (var name : ConfigProvider.getConfig().getPropertyNames()) {
if (name.startsWith("quarkus.datasource.") && name.contains(".devservices.")
&& !cachedProperties.containsKey(name)) {
&& !cachedProperties.containsKey(name) && !EXCLUDED_PROPERTIES.contains(name)) {
restartRequired = true;
break;
}
Expand Down

0 comments on commit b03133e

Please sign in to comment.