diff options
author | HÃ¥kon Hallingstad <hakon.hallingstad@gmail.com> | 2022-01-17 23:16:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 23:16:11 +0100 |
commit | 5fe129740c835f0e552bd6492cb2e110e9d5f0f3 (patch) | |
tree | 1d9e86eb7cde66e300c6b65233824da7f5bebce2 /service-monitor | |
parent | 7e0c5b69ff9e99447dd7cf223321e760f4f2a130 (diff) |
Revert "Revert "Remove dev system""
Diffstat (limited to 'service-monitor')
3 files changed, 5 insertions, 27 deletions
diff --git a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DevHostApplication.java b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DevHostApplication.java deleted file mode 100644 index e522b736290..00000000000 --- a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DevHostApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.service.duper; - -import com.yahoo.vespa.applicationmodel.InfrastructureApplication; - -/** - * @author mortent - */ -public class DevHostApplication extends HostAdminApplication { - public DevHostApplication() { - super(InfrastructureApplication.DEV_HOST); - } -} diff --git a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DuperModelManager.java b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DuperModelManager.java index 67d54091adc..9215581a2b9 100644 --- a/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DuperModelManager.java +++ b/service-monitor/src/main/java/com/yahoo/vespa/service/duper/DuperModelManager.java @@ -9,8 +9,6 @@ import com.yahoo.config.model.api.SuperModelListener; import com.yahoo.config.model.api.SuperModelProvider; import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.HostName; -import com.yahoo.config.provision.SystemName; -import com.yahoo.vespa.flags.FlagSource; import com.yahoo.vespa.service.monitor.CriticalRegion; import com.yahoo.vespa.service.monitor.DuperModelInfraApi; import com.yahoo.vespa.service.monitor.DuperModelListener; @@ -45,7 +43,6 @@ public class DuperModelManager implements DuperModelProvider, DuperModelInfraApi static final ConfigServerApplication configServerApplication = new ConfigServerApplication(); static final ProxyHostApplication proxyHostApplication = new ProxyHostApplication(); static final TenantHostApplication tenantHostApplication = new TenantHostApplication(); - static final DevHostApplication devHostApplication = new DevHostApplication(); private final Map<ApplicationId, InfraApplication> supportedInfraApplications; @@ -61,23 +58,18 @@ public class DuperModelManager implements DuperModelProvider, DuperModelInfraApi private boolean infraApplicationsIsComplete = false; @Inject - public DuperModelManager(ConfigserverConfig configServerConfig, FlagSource flagSource, SuperModelProvider superModelProvider) { + public DuperModelManager(ConfigserverConfig configServerConfig, SuperModelProvider superModelProvider) { this(configServerConfig.multitenant(), configServerConfig.serverNodeType() == ConfigserverConfig.ServerNodeType.Enum.controller, - superModelProvider, new DuperModel(), flagSource, SystemName.from(configServerConfig.system())); + superModelProvider, new DuperModel()); } /** Non-private for testing */ public DuperModelManager(boolean multitenant, boolean isController, SuperModelProvider superModelProvider, - DuperModel duperModel, FlagSource flagSource, SystemName system) { + DuperModel duperModel) { this.duperModel = duperModel; - if (system == SystemName.dev) { - // TODO (mortent): Support controllerApplication in dev system - supportedInfraApplications = - Stream.of(devHostApplication, configServerApplication) - .collect(Collectors.toUnmodifiableMap(InfraApplication::getApplicationId, Function.identity())); - } else if (multitenant) { + if (multitenant) { supportedInfraApplications = (isController ? Stream.of(controllerHostApplication, controllerApplication) : diff --git a/service-monitor/src/test/java/com/yahoo/vespa/service/duper/DuperModelManagerTest.java b/service-monitor/src/test/java/com/yahoo/vespa/service/duper/DuperModelManagerTest.java index 8b0cc621358..a3af44ec911 100644 --- a/service-monitor/src/test/java/com/yahoo/vespa/service/duper/DuperModelManagerTest.java +++ b/service-monitor/src/test/java/com/yahoo/vespa/service/duper/DuperModelManagerTest.java @@ -33,13 +33,12 @@ public class DuperModelManagerTest { private final SuperModelProvider superModelProvider = mock(SuperModelProvider.class); private final SuperModel superModel = mock(SuperModel.class); private final DuperModel duperModel = mock(DuperModel.class); - private final InMemoryFlagSource flagSource = new InMemoryFlagSource(); private DuperModelManager manager; private SuperModelListener superModelListener; private void makeManager(boolean isController) { - manager = new DuperModelManager(true, isController, superModelProvider, duperModel, flagSource, SystemName.cd); + manager = new DuperModelManager(true, isController, superModelProvider, duperModel); when(superModelProvider.getSuperModel()).thenReturn(superModel); verify(duperModel, times(0)).add(any()); |