diff options
author | Harald Musum <musum@verizonmedia.com> | 2019-11-11 12:58:02 +0100 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2019-11-11 12:58:02 +0100 |
commit | 0861faaf480fbbd185d650e6bcf8122d88d3c8de (patch) | |
tree | 25c70f94639bd8acd646028bf48d5e72c57c55a0 /config-model | |
parent | c6f92e9137324e7caca0dca219c0db95645acbc0 (diff) |
Always try to build config model for old versions
Try to build old config models, but do not fail deployment if skip-old-config-models validation override
is true and building an old model fails. In manually deployed zones we previously did not build old
config models, since skip-old-config-models was always true. With this change we will try to build
those old models, but not fail if building one or more old models fails.
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java index 1dc0b838470..54807697da4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java @@ -66,14 +66,20 @@ public class VespaModelFactory implements ModelFactory { this.clock = Clock.systemUTC(); } - + + // For testing only public VespaModelFactory(ConfigModelRegistry configModelRegistry) { this(configModelRegistry, Clock.systemUTC()); } + + // For testing only public VespaModelFactory(ConfigModelRegistry configModelRegistry, Clock clock) { - this(new Version(VespaVersion.major, VespaVersion.minor, VespaVersion.micro), configModelRegistry, clock); + this(new Version(VespaVersion.major, VespaVersion.minor, VespaVersion.micro), configModelRegistry, + clock, Zone.defaultZone()); } - public VespaModelFactory(Version version, ConfigModelRegistry configModelRegistry, Clock clock) { + + // For testing only + public VespaModelFactory(Version version, ConfigModelRegistry configModelRegistry, Clock clock, Zone zone) { this.version = version; if (configModelRegistry == null) { this.configModelRegistry = new NullConfigModelRegistry(); @@ -82,7 +88,7 @@ public class VespaModelFactory implements ModelFactory { this.configModelRegistry = configModelRegistry; } this.modelImporters = Collections.emptyList(); - this.zone = Zone.defaultZone(); + this.zone = zone; this.clock = clock; } |