aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2021-09-20 18:56:53 +0200
committerGitHub <noreply@github.com>2021-09-20 18:56:53 +0200
commit33be0f9960919d9b1b4123344852094024f236ca (patch)
treee69b51d957768b82e54fdd912beb1f72ef136e9a
parent8792117e07fb3c5dc9f7ed5b725c2f548ddcc105 (diff)
parent843edb0a9959adb0afe21ce16b40cafe0c16979a (diff)
Merge pull request #19211 from vespa-engine/balder/allow-breaking-inheritance-as-long-as-it-is-not-enforced-fully
Allow breaking inheritance as long as it is not fully enforced.
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java
index 461b9109dfa..46b785ccf42 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java
@@ -20,7 +20,6 @@ import com.yahoo.vespa.model.AbstractService;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -101,6 +100,12 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ
remaining.forEach((name, rank) -> {
if (areDependenciesReady(rank, rankProfileRegistry)) ready.add(rank);
});
+ if (ready.isEmpty() && ! deployProperties.featureFlags().enforceRankProfileInheritance()) {
+ // Dirty fallback to allow incorrect rankprofile inheritance to pass for now.
+ // We then handle one by one.
+ // TODO remove ASAP
+ ready.add(remaining.values().iterator().next());
+ }
processRankProfiles(ready, queryProfiles, importedModels, search, attributeFields, deployProperties, executor);
ready.forEach(rank -> remaining.remove(rank.getName()));
}