[ML] Removing Custom Service Feature Flag (#129780)

* Removing feature flag

* Removing missed references
This commit is contained in:
Jonathan Buttner 2025-06-23 10:44:59 -04:00 committed by GitHub
parent 2f3b2b39c5
commit c7a5c5923c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 3 additions and 42 deletions

View file

@ -20,7 +20,6 @@ public enum FeatureFlag {
SUB_OBJECTS_AUTO_ENABLED("es.sub_objects_auto_feature_flag_enabled=true", Version.fromString("8.16.0"), null),
DOC_VALUES_SKIPPER("es.doc_values_skipper_feature_flag_enabled=true", Version.fromString("8.18.1"), null),
USE_LUCENE101_POSTINGS_FORMAT("es.use_lucene101_postings_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
INFERENCE_CUSTOM_SERVICE_ENABLED("es.inference_custom_service_feature_flag_enabled=true", Version.fromString("8.19.0"), null),
IVF_FORMAT("es.ivf_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
LOGS_STREAM("es.logs_stream_feature_flag_enabled=true", Version.fromString("9.1.0"), null);

View file

@ -14,7 +14,6 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.ClassRule;
@ -45,7 +44,6 @@ public class BaseMockEISAuthServerTest extends ESRestTestCase {
// This plugin is located in the inference/qa/test-service-plugin package, look for TestInferenceServicePlugin
.plugin("inference-service-test")
.user("x_pack_rest_user", "x-pack-test-password")
.feature(FeatureFlag.INFERENCE_CUSTOM_SERVICE_ENABLED)
.build();
// The reason we're doing this is to make sure the mock server is initialized first so we can get the address before communicating

View file

@ -20,7 +20,6 @@ import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.inference.TaskType;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.xcontent.XContentBuilder;
@ -51,7 +50,6 @@ public class InferenceBaseRestTest extends ESRestTestCase {
.setting("xpack.security.enabled", "true")
.plugin("inference-service-test")
.user("x_pack_rest_user", "x-pack-test-password")
.feature(FeatureFlag.INFERENCE_CUSTOM_SERVICE_ENABLED)
.build();
@ClassRule

View file

@ -1,21 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
package org.elasticsearch.xpack.inference;
import org.elasticsearch.common.util.FeatureFlag;
public class CustomServiceFeatureFlag {
/**
* {@link org.elasticsearch.xpack.inference.services.custom.CustomService} feature flag. When the feature is complete,
* this flag will be removed.
* Enable feature via JVM option: `-Des.inference_custom_service_feature_flag_enabled=true`.
*/
public static final FeatureFlag CUSTOM_SERVICE_FEATURE_FLAG = new FeatureFlag("inference_custom_service");
private CustomServiceFeatureFlag() {}
}

View file

@ -121,8 +121,6 @@ import org.elasticsearch.xpack.inference.services.voyageai.rerank.VoyageAIRerank
import java.util.ArrayList;
import java.util.List;
import static org.elasticsearch.xpack.inference.CustomServiceFeatureFlag.CUSTOM_SERVICE_FEATURE_FLAG;
public class InferenceNamedWriteablesProvider {
private InferenceNamedWriteablesProvider() {}
@ -186,10 +184,6 @@ public class InferenceNamedWriteablesProvider {
}
private static void addCustomNamedWriteables(List<NamedWriteableRegistry.Entry> namedWriteables) {
if (CUSTOM_SERVICE_FEATURE_FLAG.isEnabled() == false) {
return;
}
namedWriteables.add(
new NamedWriteableRegistry.Entry(ServiceSettings.class, CustomServiceSettings.NAME, CustomServiceSettings::new)
);

View file

@ -149,10 +149,8 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
import static java.util.Collections.singletonList;
import static org.elasticsearch.xpack.inference.CustomServiceFeatureFlag.CUSTOM_SERVICE_FEATURE_FLAG;
import static org.elasticsearch.xpack.inference.action.filter.ShardBulkInferenceActionFilter.INDICES_INFERENCE_BATCH_SIZE;
import static org.elasticsearch.xpack.inference.common.InferenceAPIClusterAwareRateLimitingFeature.INFERENCE_API_CLUSTER_AWARE_RATE_LIMITING_FEATURE_FLAG;
@ -384,11 +382,7 @@ public class InferencePlugin extends Plugin
}
public List<InferenceServiceExtension.Factory> getInferenceServiceFactories() {
List<InferenceServiceExtension.Factory> conditionalServices = CUSTOM_SERVICE_FEATURE_FLAG.isEnabled()
? List.of(context -> new CustomService(httpFactory.get(), serviceComponents.get()))
: List.of();
List<InferenceServiceExtension.Factory> availableServices = List.of(
return List.of(
context -> new HuggingFaceElserService(httpFactory.get(), serviceComponents.get()),
context -> new HuggingFaceService(httpFactory.get(), serviceComponents.get()),
context -> new OpenAiService(httpFactory.get(), serviceComponents.get()),
@ -405,10 +399,9 @@ public class InferencePlugin extends Plugin
context -> new JinaAIService(httpFactory.get(), serviceComponents.get()),
context -> new VoyageAIService(httpFactory.get(), serviceComponents.get()),
context -> new DeepSeekService(httpFactory.get(), serviceComponents.get()),
ElasticsearchInternalService::new
ElasticsearchInternalService::new,
context -> new CustomService(httpFactory.get(), serviceComponents.get())
);
return Stream.concat(availableServices.stream(), conditionalServices.stream()).toList();
}
@Override