diff options
author | Håkon Hallingstad <hakon@yahooinc.com> | 2023-10-26 16:20:34 +0200 |
---|---|---|
committer | Håkon Hallingstad <hakon@yahooinc.com> | 2023-10-26 16:20:34 +0200 |
commit | 9f18ca064bf95f0706bb83d9c22fb6fa2993173c (patch) | |
tree | a4355ba0cad6ca5544b97ed6676738c4d4bd28e7 /flags/src | |
parent | 7dcf21422fc3e3616524342d23bf8cf197fdb6ed (diff) |
Set tenant, instance ID, and Vespa version dimensions of make-exclusive
Diffstat (limited to 'flags/src')
3 files changed, 11 insertions, 9 deletions
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/FetchVector.java b/flags/src/main/java/com/yahoo/vespa/flags/FetchVector.java index 4c4bada7552..b5a944430f3 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/FetchVector.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/FetchVector.java @@ -22,8 +22,11 @@ public class FetchVector { * Note: If this enum is changed, you must also change {@link DimensionHelper}. */ public enum Dimension { - /** Application id from ApplicationId::toSerializedForm(TenantName, ApplicationName) on the form tenant:applicationName. */ - APPLICATION_ID, + /** + * Application from ApplicationId::toSerializedFormWithoutInstance() of the form tenant:applicationName. + * <p><em>WARNING: NOT ApplicationId</em> - see {@link #INSTANCE_ID}.</p> + */ + APPLICATION, /** * Cloud from com.yahoo.config.provision.CloudName::value, e.g. yahoo, aws, gcp. diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java index fb667d60ab0..0f1815e44b6 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java @@ -13,7 +13,7 @@ import java.util.Optional; import java.util.TreeMap; import java.util.function.Predicate; -import static com.yahoo.vespa.flags.FetchVector.Dimension.APPLICATION_ID; +import static com.yahoo.vespa.flags.FetchVector.Dimension.APPLICATION; import static com.yahoo.vespa.flags.FetchVector.Dimension.INSTANCE_ID; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLOUD_ACCOUNT; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_ID; @@ -345,7 +345,8 @@ public class Flags { "make-exclusive", false, List.of("hakonhall"), "2023-10-20", "2023-12-20", "Allow an exclusive allocation to a non-exclusive host, but if so, make the host exclusive.", - "Takes immediate effect on any following preparation of clusters"); + "Takes immediate effect on any following preparation of clusters", + INSTANCE_ID, TENANT_ID, VESPA_VERSION); public static final UnboundBooleanFlag WRITE_CONFIG_SERVER_SESSION_DATA_AS_ONE_BLOB = defineFeatureFlag( "write-config-server-session-data-as-blob", false, @@ -414,14 +415,14 @@ public class Flags { List.of("bjorncs", "baldersheim"), "2023-10-01", "2024-01-01", "Adjust search handler threadpool size", "Takes effect at redeployment", - APPLICATION_ID); + APPLICATION); public static final UnboundStringFlag ENDPOINT_CONFIG = defineStringFlag( "endpoint-config", "legacy", List.of("mpolden", "tokle"), "2023-10-06", "2024-02-01", "Set the endpoint config to use for an application. Must be 'legacy', 'combined' or 'generated'. See EndpointConfig for further details", "Takes effect on next deployment through controller", - TENANT_ID, APPLICATION_ID, INSTANCE_ID); + TENANT_ID, APPLICATION, INSTANCE_ID); public static final UnboundBooleanFlag CLOUD_TRIAL_NOTIFICATIONS = defineFeatureFlag( "cloud-trial-notifications", false, diff --git a/flags/src/main/java/com/yahoo/vespa/flags/json/DimensionHelper.java b/flags/src/main/java/com/yahoo/vespa/flags/json/DimensionHelper.java index 4323af5a4fd..7298f090be2 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/json/DimensionHelper.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/json/DimensionHelper.java @@ -4,8 +4,6 @@ package com.yahoo.vespa.flags.json; import com.yahoo.vespa.flags.FetchVector; import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -19,7 +17,7 @@ public class DimensionHelper { static { // WARNING: If you ever change the serialized form of a dimension, ensure the new serialized // flag data are pushed out everywhere before removing support for old format, see VESPA-27760. - serializedDimensions.put(FetchVector.Dimension.APPLICATION_ID, "application"); + serializedDimensions.put(FetchVector.Dimension.APPLICATION, "application"); serializedDimensions.put(FetchVector.Dimension.CLOUD, "cloud"); serializedDimensions.put(FetchVector.Dimension.CLOUD_ACCOUNT, "cloud-account"); serializedDimensions.put(FetchVector.Dimension.CLUSTER_ID, "cluster-id"); |