diff options
author | Morten Tokle <mortent@yahooinc.com> | 2023-09-22 09:26:27 +0200 |
---|---|---|
committer | Morten Tokle <mortent@yahooinc.com> | 2023-09-22 09:29:41 +0200 |
commit | 4c62f27ca181c09f42ae15f7ffb4d497ab53395b (patch) | |
tree | ecdbfd337ebc9fe6086c789e3abe04034d7d379f /flags | |
parent | 97b9fa198daa53200c49b7045ae79d47f700e331 (diff) |
Rename dimension APPLICATION_ID -> INSTANCE_ID
Diffstat (limited to 'flags')
8 files changed, 96 insertions, 96 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 7af1661cf0c..b16d26a04a4 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/FetchVector.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/FetchVector.java @@ -22,9 +22,6 @@ public class FetchVector { * Note: If this enum is changed, you must also change {@link DimensionHelper}. */ public enum Dimension { - /** Value from ApplicationId::serializedForm of the form tenant:applicationName:instance. */ - APPLICATION_ID, - /** * Cloud from com.yahoo.config.provision.CloudName::value, e.g. yahoo, aws, gcp. * @@ -59,6 +56,9 @@ public class FetchVector { */ HOSTNAME, + /** Value from ApplicationId::serializedForm of the form tenant:applicationName:instance. */ + INSTANCE_ID, + /** Node type from com.yahoo.config.provision.NodeType::name, e.g. tenant, host, confighost, controller, etc. */ NODE_TYPE, diff --git a/flags/src/main/java/com/yahoo/vespa/flags/FlagDefinition.java b/flags/src/main/java/com/yahoo/vespa/flags/FlagDefinition.java index 1773a03feb1..451f45ec792 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/FlagDefinition.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/FlagDefinition.java @@ -77,7 +77,7 @@ public class FlagDefinition { if (dimensions.contains(FetchVector.Dimension.CONSOLE_USER_EMAIL)) { Set<FetchVector.Dimension> disallowedCombinations = EnumSet.allOf(FetchVector.Dimension.class); disallowedCombinations.remove(FetchVector.Dimension.CONSOLE_USER_EMAIL); - disallowedCombinations.remove(FetchVector.Dimension.APPLICATION_ID); + disallowedCombinations.remove(FetchVector.Dimension.INSTANCE_ID); disallowedCombinations.remove(FetchVector.Dimension.TENANT_ID); disallowedCombinations.retainAll(dimensions); if (!disallowedCombinations.isEmpty()) 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 de14d4e7b00..2e158f0f3ef 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.INSTANCE_ID; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLOUD_ACCOUNT; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_ID; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_TYPE; @@ -35,7 +35,7 @@ import static com.yahoo.vespa.flags.FetchVector.Dimension.VESPA_VERSION; * an unbound flag to a flag source produces a (bound) flag, e.g. {@link BooleanFlag} and {@link StringFlag}.</li> * <li>If you would like your flag value to be dependent on e.g. the application ID, then 1. you should * declare this in the unbound flag definition in this file (referring to - * {@link FetchVector.Dimension#APPLICATION_ID}), and 2. specify the application ID when retrieving the value, e.g. + * {@link FetchVector.Dimension#INSTANCE_ID}), and 2. specify the application ID when retrieving the value, e.g. * {@link BooleanFlag#with(FetchVector.Dimension, String)}. See {@link FetchVector} for more info.</li> * </ol> * @@ -53,7 +53,7 @@ public class Flags { List.of("baldersheim"), "2020-12-02", "2023-12-31", "Default limit for when to apply termwise query evaluation", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag QUERY_DISPATCH_POLICY = defineStringFlag( "query-dispatch-policy", "adaptive", @@ -61,62 +61,62 @@ public class Flags { "Select query dispatch policy, valid values are adaptive, round-robin, best-of-random-2," + " latency-amortized-over-requests, latency-amortized-over-time", "Takes effect at redeployment (requires restart)", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag SUMMARY_DECODE_POLICY = defineStringFlag( "summary-decode-policy", "eager", List.of("baldersheim"), "2023-03-30", "2023-12-31", "Select summary decoding policy, valid values are eager and on-demand/ondemand.", "Takes effect at redeployment (requires restart)", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag FEED_SEQUENCER_TYPE = defineStringFlag( "feed-sequencer-type", "THROUGHPUT", List.of("baldersheim"), "2020-12-02", "2023-12-31", "Selects type of sequenced executor used for feeding in proton, valid values are LATENCY, ADAPTIVE, THROUGHPUT", "Takes effect at redeployment (requires restart)", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MAX_UNCOMMITTED_MEMORY = defineIntFlag( "max-uncommitted-memory", 130000, List.of("geirst, baldersheim"), "2021-10-21", "2023-12-31", "Max amount of memory holding updates to an attribute before we do a commit.", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag RESPONSE_SEQUENCER_TYPE = defineStringFlag( "response-sequencer-type", "ADAPTIVE", List.of("baldersheim"), "2020-12-02", "2023-12-31", "Selects type of sequenced executor used for mbus responses, valid values are LATENCY, ADAPTIVE, THROUGHPUT", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag RESPONSE_NUM_THREADS = defineIntFlag( "response-num-threads", 2, List.of("baldersheim"), "2020-12-02", "2023-12-31", "Number of threads used for mbus responses, default is 2, negative number = numcores/4", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag USE_ASYNC_MESSAGE_HANDLING_ON_SCHEDULE = defineFeatureFlag( "async-message-handling-on-schedule", false, List.of("baldersheim"), "2020-12-02", "2023-12-31", "Optionally deliver async messages in own thread", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundDoubleFlag FEED_CONCURRENCY = defineDoubleFlag( "feed-concurrency", 0.5, List.of("baldersheim"), "2020-12-02", "2023-12-31", "How much concurrency should be allowed for feed", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundDoubleFlag FEED_NICENESS = defineDoubleFlag( "feed-niceness", 0.0, List.of("baldersheim"), "2022-06-24", "2023-12-31", "How nice feeding shall be", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MBUS_JAVA_NUM_TARGETS = defineIntFlag( @@ -124,71 +124,71 @@ public class Flags { List.of("baldersheim"), "2022-07-05", "2023-12-31", "Number of rpc targets per service", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MBUS_CPP_NUM_TARGETS = defineIntFlag( "mbus-cpp-num-targets", 2, List.of("baldersheim"), "2022-07-05", "2023-12-31", "Number of rpc targets per service", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag RPC_NUM_TARGETS = defineIntFlag( "rpc-num-targets", 2, List.of("baldersheim"), "2022-07-05", "2023-12-31", "Number of rpc targets per content node", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MBUS_JAVA_EVENTS_BEFORE_WAKEUP = defineIntFlag( "mbus-java-events-before-wakeup", 1, List.of("baldersheim"), "2022-07-05", "2023-12-31", "Number write events before waking up transport thread", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MBUS_CPP_EVENTS_BEFORE_WAKEUP = defineIntFlag( "mbus-cpp-events-before-wakeup", 1, List.of("baldersheim"), "2022-07-05", "2023-12-31", "Number write events before waking up transport thread", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag RPC_EVENTS_BEFORE_WAKEUP = defineIntFlag( "rpc-events-before-wakeup", 1, List.of("baldersheim"), "2022-07-05", "2023-12-31", "Number write events before waking up transport thread", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MBUS_NUM_NETWORK_THREADS = defineIntFlag( "mbus-num-network-threads", 1, List.of("baldersheim"), "2022-07-01", "2023-12-31", "Number of threads used for mbus network", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag SHARED_STRING_REPO_NO_RECLAIM = defineFeatureFlag( "shared-string-repo-no-reclaim", false, List.of("baldersheim"), "2022-06-14", "2023-12-31", "Controls whether we do track usage and reclaim unused enum values in shared string repo", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag CONTAINER_DUMP_HEAP_ON_SHUTDOWN_TIMEOUT = defineFeatureFlag( "container-dump-heap-on-shutdown-timeout", false, List.of("baldersheim"), "2021-09-25", "2023-12-31", "Will trigger a heap dump during if container shutdown times out", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag LOAD_CODE_AS_HUGEPAGES = defineFeatureFlag( "load-code-as-hugepages", false, List.of("baldersheim"), "2022-05-13", "2023-12-31", "Will try to map the code segment with huge (2M) pages", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundDoubleFlag CONTAINER_SHUTDOWN_TIMEOUT = defineDoubleFlag( "container-shutdown-timeout", 50.0, List.of("baldersheim"), "2021-09-25", "2023-12-31", "Timeout for shutdown of a jdisc container", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); // TODO: Move to a permanent flag public static final UnboundListFlag<String> ALLOWED_ATHENZ_PROXY_IDENTITIES = defineListFlag( @@ -203,14 +203,14 @@ public class Flags { "Allows replicas in up to N content groups to not be activated " + "for query visibility if they are out of sync with a majority of other replicas", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundDoubleFlag MIN_NODE_RATIO_PER_GROUP = defineDoubleFlag( "min-node-ratio-per-group", 0.0, List.of("geirst", "vekterli"), "2021-07-16", "2023-12-01", "Minimum ratio of nodes that have to be available (i.e. not Down) in any hierarchic content cluster group for the group to be Up", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag SYSTEM_MEMORY_HIGH = defineStringFlag( "system-memory-high", "", @@ -243,28 +243,28 @@ public class Flags { List.of("arnej"), "2021-11-15", "2023-12-31", "Use Vespa 8 types and formats for geographical positions", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MAX_COMPACT_BUFFERS = defineIntFlag( "max-compact-buffers", 1, List.of("baldersheim", "geirst", "toregge"), "2021-12-15", "2023-12-31", "Upper limit of buffers to compact in a data store at the same time for each reason (memory usage, address space usage)", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag ENABLE_PROXY_PROTOCOL_MIXED_MODE = defineFeatureFlag( "enable-proxy-protocol-mixed-mode", true, List.of("tokle"), "2022-05-09", "2023-10-01", "Enable or disable proxy protocol mixed mode", "Takes effect on redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag LOG_FILE_COMPRESSION_ALGORITHM = defineStringFlag( "log-file-compression-algorithm", "", List.of("arnej"), "2022-06-14", "2024-12-31", "Which algorithm to use for compressing log files. Valid values: empty string (default), gzip, zstd", "Takes effect immediately", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag SEPARATE_METRIC_CHECK_CONFIG = defineFeatureFlag( "separate-metric-check-config", false, @@ -278,7 +278,7 @@ public class Flags { List.of("bjorncs", "vekterli"), "2022-07-21", "2024-01-01", "Configure Vespa TLS capability enforcement mode", "Takes effect on restart of Docker container", - APPLICATION_ID,HOSTNAME,NODE_TYPE,TENANT_ID,VESPA_VERSION + INSTANCE_ID,HOSTNAME,NODE_TYPE,TENANT_ID,VESPA_VERSION ); public static final UnboundBooleanFlag ENABLE_OTELCOL = defineFeatureFlag( @@ -286,7 +286,7 @@ public class Flags { List.of("olaa"), "2022-09-23", "2023-12-01", "Whether an OpenTelemetry collector should be enabled", "Takes effect at next tick", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag CORE_ENCRYPTION_PUBLIC_KEY_ID = defineStringFlag( "core-encryption-public-key-id", "", @@ -300,7 +300,7 @@ public class Flags { List.of("arnej", "bjorncs"), "2023-02-28", "2024-01-10", "Enable global phase ranking", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag ENABLE_CROWDSTRIKE = defineFeatureFlag( "enable-crowdstrike", true, List.of("andreer"), "2023-04-13", "2023-10-14", @@ -311,7 +311,7 @@ public class Flags { "randomized-endpoint-names", false, List.of("andreer"), "2023-04-26", "2023-10-14", "Whether to use randomized endpoint names", "Takes effect on application deployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag ENABLE_THE_ONE_THAT_SHOULD_NOT_BE_NAMED = defineFeatureFlag( "enable-the-one-that-should-not-be-named", false, List.of("hmusum"), "2023-05-08", "2023-10-01", @@ -329,14 +329,14 @@ public class Flags { List.of("baldersheim"), "2023-06-29", "2023-12-31", "Should we enable proper nested multivalue grouping", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag USE_RECONFIGURABLE_DISPATCHER = defineFeatureFlag( "use-reconfigurable-dispatcher", false, List.of("jonmv"), "2023-07-14", "2023-10-01", "Whether to set up a ReconfigurableDispatcher with config self-sub for backend nodes", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag WRITE_CONFIG_SERVER_SESSION_DATA_AS_ONE_BLOB = defineFeatureFlag( "write-config-server-session-data-as-blob", false, @@ -382,21 +382,21 @@ public class Flags { List.of("freva"), "2023-09-08", "2023-11-01", "Minimum amount of advertised memory for exclusive nodes", "Takes effect immediately", - APPLICATION_ID, CLUSTER_ID, CLUSTER_TYPE); + INSTANCE_ID, CLUSTER_ID, CLUSTER_TYPE); public static final UnboundBooleanFlag ASSIGN_RANDOMIZED_ID = defineFeatureFlag( "assign-randomized-id", false, List.of("mortent"), "2023-08-31", "2024-02-01", "Whether to assign randomized id to the application", "Takes effect immediately", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag ASSIGNED_RANDOMIZED_ID_RATE = defineIntFlag( "assign-randomized-id-rate", 5, List.of("mortent"), "2023-09-11", "2024-02-01", "Rate for requesting assigned ids for existing certificates. Rate is per maintainer cycle.", "Takes effect immediately", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag CONTENT_LAYER_METADATA_FEATURE_LEVEL = defineIntFlag( "content-layer-metadata-feature-level", 0, @@ -404,7 +404,7 @@ public class Flags { "Value semantics: 0) legacy behavior, 1) operation cancellation, 2) operation " + "cancellation and ephemeral content node sequence numbers for bucket replicas", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); /** WARNING: public for testing: All flags should be defined in {@link Flags}. */ public static UnboundBooleanFlag defineFeatureFlag(String flagId, boolean defaultValue, List<String> owners, diff --git a/flags/src/main/java/com/yahoo/vespa/flags/PermanentFlags.java b/flags/src/main/java/com/yahoo/vespa/flags/PermanentFlags.java index f856ebeb456..629636afb68 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/PermanentFlags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/PermanentFlags.java @@ -13,7 +13,7 @@ import java.util.Set; import java.util.function.Predicate; import java.util.regex.Pattern; -import static com.yahoo.vespa.flags.FetchVector.Dimension.APPLICATION_ID; +import static com.yahoo.vespa.flags.FetchVector.Dimension.INSTANCE_ID; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_ID; import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_TYPE; import static com.yahoo.vespa.flags.FetchVector.Dimension.CONSOLE_USER_EMAIL; @@ -43,19 +43,19 @@ public class PermanentFlags { "jvm-gc-options", "", "Sets default jvm gc options", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag HEAP_SIZE_PERCENTAGE = defineIntFlag( "heap-size-percentage", 70, "Sets default jvm heap size percentage", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundDoubleFlag QUERY_DISPATCH_WARMUP = defineDoubleFlag( "query-dispatch-warmup", 5, "Warmup duration for query dispatcher", "Takes effect at redeployment (requires restart)", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag FLEET_CANARY = defineFeatureFlag( "fleet-canary", false, @@ -86,13 +86,13 @@ public class PermanentFlags { "host-flavor", "", "Specifies the Vespa flavor name that the hosts of the matching nodes should have.", "Takes effect on next deployment (including internal redeployment).", - APPLICATION_ID, CLUSTER_TYPE, CLUSTER_ID); + INSTANCE_ID, CLUSTER_TYPE, CLUSTER_ID); public static final UnboundBooleanFlag SKIP_MAINTENANCE_DEPLOYMENT = defineFeatureFlag( "node-repository-skip-maintenance-deployment", false, "Whether PeriodicApplicationMaintainer should skip deployment for an application", "Takes effect at next run of maintainer", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundListFlag<String> INACTIVE_MAINTENANCE_JOBS = defineListFlag( "inactive-maintenance-jobs", List.of(), String.class, @@ -120,19 +120,19 @@ public class PermanentFlags { "Hard limit on how many CPUs a container may use. This value is multiplied by CPU allocated to node, so " + "to cap CPU at 200%, set this to 2, etc. 0 disables the cap to allow unlimited CPU.", "Takes effect on next node agent tick. Change is orchestrated, but does NOT require container restart", - HOSTNAME, APPLICATION_ID, CLUSTER_ID, CLUSTER_TYPE); + HOSTNAME, INSTANCE_ID, CLUSTER_ID, CLUSTER_TYPE); public static final UnboundIntFlag MIN_DISK_THROUGHPUT_MB_S = defineIntFlag( "min-disk-throughput-mb-s", 0, "Minimum required disk throughput performance, 0 = default, Only when using remote disk", "Takes effect when node is provisioned", - APPLICATION_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); + INSTANCE_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); public static final UnboundIntFlag MIN_DISK_IOPS_K = defineIntFlag( "min-disk-iops-k", 0, "Minimum required disk I/O operations per second, unit is kilo, 0 = default, Only when using remote disk", "Takes effect when node is provisioned", - APPLICATION_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); + INSTANCE_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); public static final UnboundListFlag<String> DISABLED_HOST_ADMIN_TASKS = defineListFlag( "disabled-host-admin-tasks", List.of(), String.class, @@ -145,13 +145,13 @@ public class PermanentFlags { "docker-image-repo", "", "Override default docker image repo. Docker image version will be Vespa version.", "Takes effect on next deployment from controller", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag SEND_LIMITED_METRIC_SET = defineFeatureFlag( "send-limited-metric-set", true, "Whether a limited metric set should be fetched from metrics-proxy (CD systems only)", "Takes effect on next host admin tick", - APPLICATION_ID); + INSTANCE_ID); private static final String VERSION_QUALIFIER_REGEX = "[a-zA-Z0-9_-]+"; private static final Pattern QUALIFIER_PATTERN = Pattern.compile("^" + VERSION_QUALIFIER_REGEX + "$"); @@ -164,13 +164,13 @@ public class PermanentFlags { "Otherwise a '.' + the flag value will be appended.", "Takes effect on the next host admin tick. The upgrade to the new wanted docker image is orchestrated.", value -> value.isEmpty() || QUALIFIER_PATTERN.matcher(value).find() || VERSION_PATTERN.matcher(value).find(), - HOSTNAME, NODE_TYPE, TENANT_ID, APPLICATION_ID, CLUSTER_TYPE, CLUSTER_ID, VESPA_VERSION); + HOSTNAME, NODE_TYPE, TENANT_ID, INSTANCE_ID, CLUSTER_TYPE, CLUSTER_ID, VESPA_VERSION); public static final UnboundStringFlag ZOOKEEPER_SERVER_VERSION = defineStringFlag( "zookeeper-server-version", "3.8.0", "ZooKeeper server version, a jar file zookeeper-server-<ZOOKEEPER_SERVER_VERSION>-jar-with-dependencies.jar must exist", "Takes effect on restart of Docker container", - NODE_TYPE, APPLICATION_ID, HOSTNAME); + NODE_TYPE, INSTANCE_ID, HOSTNAME); public static final UnboundBooleanFlag ENABLE_PUBLIC_SIGNUP_FLOW = defineFeatureFlag( "enable-public-signup-flow", false, @@ -188,7 +188,7 @@ public class PermanentFlags { "jvm-omit-stack-trace-in-fast-throw", true, "Controls JVM option OmitStackTraceInFastThrow (default feature flag value is true, which is the default JVM option value as well)", "takes effect on JVM restart", - CLUSTER_TYPE, APPLICATION_ID); + CLUSTER_TYPE, INSTANCE_ID); public static final UnboundIntFlag MAX_TRIAL_TENANTS = defineIntFlag( "max-trial-tenants", -1, @@ -200,7 +200,7 @@ public class PermanentFlags { "allow-disable-mtls", true, "Allow application to disable client authentication", "Takes effect on redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MAX_OS_UPGRADES = defineIntFlag( "max-os-upgrades", 30, @@ -219,7 +219,7 @@ public class PermanentFlags { "tls-ciphers-override", List.of(), String.class, "Override TLS ciphers enabled for port 4443 on hosted application containers", "Takes effect on redeployment", - APPLICATION_ID + INSTANCE_ID ); public static final UnboundStringFlag ENDPOINT_CERTIFICATE_ALGORITHM = defineStringFlag( @@ -227,20 +227,20 @@ public class PermanentFlags { // Acceptable values are: "rsa_4096", "ecdsa_p256" "Selects algorithm used for an applications endpoint certificate", "Takes effect when a new endpoint certificate is requested (on first deployment or deployment adding new endpoints)", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundDoubleFlag RESOURCE_LIMIT_DISK = defineDoubleFlag( "resource-limit-disk", 0.75, "Resource limit (between 0.0 and 1.0) for disk usage on content nodes, used by cluster controller for when to block feed", "Takes effect on next deployment", - APPLICATION_ID + INSTANCE_ID ); public static final UnboundDoubleFlag RESOURCE_LIMIT_MEMORY = defineDoubleFlag( "resource-limit-memory", 0.8, "Resource limit (between 0.0 and 1.0) for memory usage on content nodes, used by cluster controller for when to block feed", "Takes effect on next deployment", - APPLICATION_ID + INSTANCE_ID ); public static final UnboundListFlag<String> LOGCTL_OVERRIDE = defineListFlag( @@ -248,7 +248,7 @@ public class PermanentFlags { "A list of vespa-logctl statements that are run on container startup. " + "Each item should be on the form <service>:<component> <level>=on", "Takes effect on container restart", - APPLICATION_ID, HOSTNAME + INSTANCE_ID, HOSTNAME ); public static final UnboundListFlag<String> ENVIRONMENT_VARIABLES = defineListFlag( @@ -256,14 +256,14 @@ public class PermanentFlags { "A list of environment variables set for all services. " + "Each item should be on the form <ENV_VAR>=<VALUE>", "Takes effect on service restart", - APPLICATION_ID + INSTANCE_ID ); public static final UnboundStringFlag CONFIG_PROXY_JVM_ARGS = defineStringFlag( "config-proxy-jvm-args", "", "Sets jvm args for config proxy (added at the end of startup command, will override existing ones)", "Takes effect on restart of Docker container", - APPLICATION_ID + INSTANCE_ID ); // This must be set in a feature flag to avoid flickering between the new and old value during config server upgrade @@ -277,20 +277,20 @@ public class PermanentFlags { "forward-issues-as-errors", true, "When the backend detects a problematic issue with a query, it will by default send it as an error message to the QRS, which adds it in an ErrorHit in the result. May be disabled using this flag.", "Takes effect immediately", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag DEACTIVATE_ROUTING = defineFeatureFlag( "deactivate-routing", false, "Deactivates routing for an application by removing all reals from its load balancers. Used in " + "cases where we immediately need to stop serving an application, i.e. in case of service violations", "Takes effect on next redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundListFlag<String> IGNORED_HTTP_USER_AGENTS = defineListFlag( "ignored-http-user-agents", List.of(), String.class, "List of user agents to ignore (crawlers etc)", "Takes effect immediately.", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundListFlag<String> INCOMPATIBLE_VERSIONS = defineListFlag( "incompatible-versions", List.of("8"), String.class, @@ -305,7 +305,7 @@ public class PermanentFlags { "The config server will refuse to serve config to nodes running a version which is incompatible with their " + "current wanted node version, i.e., nodes about to upgrade to a version which is incompatible with the current.", "Takes effect immediately", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundStringFlag ADMIN_CLUSTER_NODE_ARCHITECTURE = defineStringFlag( "admin-cluster-node-architecture", "x86_64", @@ -313,7 +313,7 @@ public class PermanentFlags { "(logserver and clustercontroller clusters).", "Takes effect on next redeployment", value -> Set.of("any", "arm64", "x86_64").contains(value), - APPLICATION_ID); + INSTANCE_ID); public static final UnboundListFlag<String> CLOUD_ACCOUNTS = defineListFlag( "cloud-accounts", List.of(), String.class, @@ -325,20 +325,20 @@ public class PermanentFlags { "fail-deployment-for-files-with-unknown-extension", "FAIL", "Whether to log or fail for deployments when app has a file with unknown extension (valid values: LOG, FAIL)", "Takes effect at redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundListFlag<String> DISABLED_DEPLOYMENT_ZONES = defineListFlag( "disabled-deployment-zones", List.of(), String.class, "The zones, e.g., prod.norway-71, where deployments jobs are currently disabled", "Takes effect immediately", - APPLICATION_ID + INSTANCE_ID ); public static final UnboundBooleanFlag ALLOW_USER_FILTERS = defineFeatureFlag( "allow-user-filters", true, "Allow user filter (chains) in application", "Takes effect on next redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundLongFlag CONFIG_SERVER_SESSION_EXPIRY_TIME = defineLongFlag( "config-server-session-expiry-time", 3600, @@ -357,27 +357,27 @@ public class PermanentFlags { "keep-file-references-days", 30, "How many days to keep file references on tenant nodes (based on last modification time)", "Takes effect on restart of Docker container", - APPLICATION_ID + INSTANCE_ID ); public static final UnboundIntFlag KEEP_FILE_REFERENCES_COUNT = defineIntFlag( "keep-file-references-count", 20, "How many file references to keep on tenant nodes (no matter what last modification time is)", "Takes effect on restart of Docker container", - ZONE_ID, APPLICATION_ID + ZONE_ID, INSTANCE_ID ); public static final UnboundIntFlag ENDPOINT_CONNECTION_TTL = defineIntFlag( "endpoint-connection-ttl", 45, "Time to live for connections to endpoints in seconds", "Takes effect on next redeployment", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundBooleanFlag AUTOSCALING = defineFeatureFlag( "autoscaling", true, "Whether to enable autoscaling", "Takes effect immediately", - APPLICATION_ID); + INSTANCE_ID); public static final UnboundIntFlag MAX_HOSTS_PER_HOUR = defineIntFlag( "max-hosts-per-hour", 40, @@ -392,7 +392,7 @@ public class PermanentFlags { "Takes effect on next tick", // The application ID is the exclusive application ID associated with the host, // if any, or otherwise hosted-vespa:tenant-host:default. - APPLICATION_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); + INSTANCE_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); public static final UnboundIntFlag DROP_DENTRIES = defineIntFlag( "drop-dentries", -1, @@ -401,7 +401,7 @@ public class PermanentFlags { "Takes effect on next tick", // The application ID is the exclusive application ID associated with the host, // if any, or otherwise hosted-vespa:tenant-host:default. - APPLICATION_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); + INSTANCE_ID, TENANT_ID, CLUSTER_ID, CLUSTER_TYPE); public static final UnboundIntFlag CERT_POOL_SIZE = defineIntFlag( "cert-pool-size", 0, 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 2193d70ec47..3d63a31d3a2 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 @@ -15,7 +15,7 @@ public class DimensionHelper { private static final Map<FetchVector.Dimension, String> serializedDimensions = new HashMap<>(); static { - serializedDimensions.put(FetchVector.Dimension.APPLICATION_ID, "application"); + serializedDimensions.put(FetchVector.Dimension.INSTANCE_ID, "application"); serializedDimensions.put(FetchVector.Dimension.CLOUD, "cloud"); serializedDimensions.put(FetchVector.Dimension.CLOUD_ACCOUNT, "cloud-account"); serializedDimensions.put(FetchVector.Dimension.CLUSTER_ID, "cluster-id"); diff --git a/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java b/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java index 3edde140de8..dd332be6627 100644 --- a/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java +++ b/flags/src/test/java/com/yahoo/vespa/flags/FlagsTest.java @@ -50,7 +50,7 @@ public class FlagsTest { // zone is set because it was set on the unbound flag above assertThat(vector.getValue().getValue(FetchVector.Dimension.ZONE_ID), is(Optional.of("a-zone"))); // application and node type are not set - assertThat(vector.getValue().getValue(FetchVector.Dimension.APPLICATION_ID), is(Optional.empty())); + assertThat(vector.getValue().getValue(FetchVector.Dimension.INSTANCE_ID), is(Optional.empty())); assertThat(vector.getValue().getValue(FetchVector.Dimension.NODE_TYPE), is(Optional.empty())); RawFlag rawFlag = mock(RawFlag.class); @@ -58,11 +58,11 @@ public class FlagsTest { when(rawFlag.asJsonNode()).thenReturn(BooleanNode.getTrue()); // raw flag deserializes to true - assertThat(booleanFlag.with(FetchVector.Dimension.APPLICATION_ID, "an-app").value(), equalTo(true)); + assertThat(booleanFlag.with(FetchVector.Dimension.INSTANCE_ID, "an-app").value(), equalTo(true)); verify(source, times(2)).fetch(any(), vector.capture()); // application was set on the (bound) flag. - assertThat(vector.getValue().getValue(FetchVector.Dimension.APPLICATION_ID), is(Optional.of("an-app"))); + assertThat(vector.getValue().getValue(FetchVector.Dimension.INSTANCE_ID), is(Optional.of("an-app"))); } @Test diff --git a/flags/src/test/java/com/yahoo/vespa/flags/json/ConditionTest.java b/flags/src/test/java/com/yahoo/vespa/flags/json/ConditionTest.java index 4da66bd5cc1..084ad3b9395 100644 --- a/flags/src/test/java/com/yahoo/vespa/flags/json/ConditionTest.java +++ b/flags/src/test/java/com/yahoo/vespa/flags/json/ConditionTest.java @@ -18,7 +18,7 @@ public class ConditionTest { var params = new Condition.CreateParams(FetchVector.Dimension.HOSTNAME).withValues(hostname1); Condition condition = WhitelistCondition.create(params); assertFalse(condition.test(new FetchVector())); - assertFalse(condition.test(new FetchVector().with(FetchVector.Dimension.APPLICATION_ID, "foo"))); + assertFalse(condition.test(new FetchVector().with(FetchVector.Dimension.INSTANCE_ID, "foo"))); assertFalse(condition.test(new FetchVector().with(FetchVector.Dimension.HOSTNAME, "bar"))); assertTrue(condition.test(new FetchVector().with(FetchVector.Dimension.HOSTNAME, hostname1))); } @@ -29,7 +29,7 @@ public class ConditionTest { var params = new Condition.CreateParams(FetchVector.Dimension.HOSTNAME).withValues(hostname1); Condition condition = BlacklistCondition.create(params); assertTrue(condition.test(new FetchVector())); - assertTrue(condition.test(new FetchVector().with(FetchVector.Dimension.APPLICATION_ID, "foo"))); + assertTrue(condition.test(new FetchVector().with(FetchVector.Dimension.INSTANCE_ID, "foo"))); assertTrue(condition.test(new FetchVector().with(FetchVector.Dimension.HOSTNAME, "bar"))); assertFalse(condition.test(new FetchVector().with(FetchVector.Dimension.HOSTNAME, hostname1))); } diff --git a/flags/src/test/java/com/yahoo/vespa/flags/json/FlagDataTest.java b/flags/src/test/java/com/yahoo/vespa/flags/json/FlagDataTest.java index 3ca7f59c759..64eace97849 100644 --- a/flags/src/test/java/com/yahoo/vespa/flags/json/FlagDataTest.java +++ b/flags/src/test/java/com/yahoo/vespa/flags/json/FlagDataTest.java @@ -62,16 +62,16 @@ public class FlagDataTest { // First rule matches only if both conditions match verify(Optional.of("false"), vector .with(FetchVector.Dimension.HOSTNAME, "host1") - .with(FetchVector.Dimension.APPLICATION_ID, "app2")); + .with(FetchVector.Dimension.INSTANCE_ID, "app2")); verify(Optional.of("true"), vector .with(FetchVector.Dimension.HOSTNAME, "host1") - .with(FetchVector.Dimension.APPLICATION_ID, "app3")); + .with(FetchVector.Dimension.INSTANCE_ID, "app3")); // Verify unsetting a dimension with null works. verify(Optional.of("true"), vector .with(FetchVector.Dimension.HOSTNAME, "host1") - .with(FetchVector.Dimension.APPLICATION_ID, "app3") - .with(FetchVector.Dimension.APPLICATION_ID, null)); + .with(FetchVector.Dimension.INSTANCE_ID, "app3") + .with(FetchVector.Dimension.INSTANCE_ID, null)); // No rules apply if zone is overridden to an unknown zone verify(Optional.empty(), vector.with(FetchVector.Dimension.ZONE_ID, "unknown zone")); @@ -81,7 +81,7 @@ public class FlagDataTest { void testPartialResolve() { FlagData data = FlagData.deserialize(json); assertEquals(data.partialResolve(vector), data); - assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app1")), + assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app1")), FlagData.deserialize(""" { "id": "id1", @@ -102,7 +102,7 @@ public class FlagDataTest { } }""")); - assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app1")), + assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app1")), FlagData.deserialize(""" { "id": "id1", @@ -123,7 +123,7 @@ public class FlagDataTest { } }""")); - assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app3")), + assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app3")), FlagData.deserialize(""" { "id": "id1", @@ -154,7 +154,7 @@ public class FlagDataTest { } }""")); - assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app3") + assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app3") .with(FetchVector.Dimension.HOSTNAME, "host1")), FlagData.deserialize(""" { @@ -169,7 +169,7 @@ public class FlagDataTest { } }""")); - assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app3") + assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app3") .with(FetchVector.Dimension.HOSTNAME, "host3")), FlagData.deserialize(""" { @@ -191,7 +191,7 @@ public class FlagDataTest { } }""")); - assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app3") + assertEquals(data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app3") .with(FetchVector.Dimension.HOSTNAME, "host3") .with(FetchVector.Dimension.ZONE_ID, "zone2")), FlagData.deserialize(""" @@ -204,7 +204,7 @@ public class FlagDataTest { ] }""")); - FlagData fullyResolved = data.partialResolve(vector.with(FetchVector.Dimension.APPLICATION_ID, "app3") + FlagData fullyResolved = data.partialResolve(vector.with(FetchVector.Dimension.INSTANCE_ID, "app3") .with(FetchVector.Dimension.HOSTNAME, "host3") .with(FetchVector.Dimension.ZONE_ID, "zone3")); assertEquals(fullyResolved, FlagData.deserialize(""" |