Skip to content

Commit 5741575

Browse files
Removing feature flag
1 parent 4ca96c1 commit 5741575

File tree

4 files changed

+3
-38
lines changed

4 files changed

+3
-38
lines changed

test/test-clusters/src/main/java/org/elasticsearch/test/cluster/FeatureFlag.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public enum FeatureFlag {
2020
SUB_OBJECTS_AUTO_ENABLED("es.sub_objects_auto_feature_flag_enabled=true", Version.fromString("8.16.0"), null),
2121
DOC_VALUES_SKIPPER("es.doc_values_skipper_feature_flag_enabled=true", Version.fromString("8.18.1"), null),
2222
USE_LUCENE101_POSTINGS_FORMAT("es.use_lucene101_postings_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
23-
INFERENCE_CUSTOM_SERVICE_ENABLED("es.inference_custom_service_feature_flag_enabled=true", Version.fromString("8.19.0"), null),
2423
IVF_FORMAT("es.ivf_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
2524
LOGS_STREAM("es.logs_stream_feature_flag_enabled=true", Version.fromString("9.1.0"), null);
2625

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/CustomServiceFeatureFlag.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceNamedWriteablesProvider.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@
121121
import java.util.ArrayList;
122122
import java.util.List;
123123

124-
import static org.elasticsearch.xpack.inference.CustomServiceFeatureFlag.CUSTOM_SERVICE_FEATURE_FLAG;
125-
126124
public class InferenceNamedWriteablesProvider {
127125

128126
private InferenceNamedWriteablesProvider() {}
@@ -186,10 +184,6 @@ public static List<NamedWriteableRegistry.Entry> getNamedWriteables() {
186184
}
187185

188186
private static void addCustomNamedWriteables(List<NamedWriteableRegistry.Entry> namedWriteables) {
189-
if (CUSTOM_SERVICE_FEATURE_FLAG.isEnabled() == false) {
190-
return;
191-
}
192-
193187
namedWriteables.add(
194188
new NamedWriteableRegistry.Entry(ServiceSettings.class, CustomServiceSettings.NAME, CustomServiceSettings::new)
195189
);

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferencePlugin.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,8 @@
149149
import java.util.Set;
150150
import java.util.function.Predicate;
151151
import java.util.function.Supplier;
152-
import java.util.stream.Stream;
153152

154153
import static java.util.Collections.singletonList;
155-
import static org.elasticsearch.xpack.inference.CustomServiceFeatureFlag.CUSTOM_SERVICE_FEATURE_FLAG;
156154
import static org.elasticsearch.xpack.inference.action.filter.ShardBulkInferenceActionFilter.INDICES_INFERENCE_BATCH_SIZE;
157155
import static org.elasticsearch.xpack.inference.common.InferenceAPIClusterAwareRateLimitingFeature.INFERENCE_API_CLUSTER_AWARE_RATE_LIMITING_FEATURE_FLAG;
158156

@@ -384,11 +382,7 @@ public void loadExtensions(ExtensionLoader loader) {
384382
}
385383

386384
public List<InferenceServiceExtension.Factory> getInferenceServiceFactories() {
387-
List<InferenceServiceExtension.Factory> conditionalServices = CUSTOM_SERVICE_FEATURE_FLAG.isEnabled()
388-
? List.of(context -> new CustomService(httpFactory.get(), serviceComponents.get()))
389-
: List.of();
390-
391-
List<InferenceServiceExtension.Factory> availableServices = List.of(
385+
return List.of(
392386
context -> new HuggingFaceElserService(httpFactory.get(), serviceComponents.get()),
393387
context -> new HuggingFaceService(httpFactory.get(), serviceComponents.get()),
394388
context -> new OpenAiService(httpFactory.get(), serviceComponents.get()),
@@ -405,10 +399,9 @@ public List<InferenceServiceExtension.Factory> getInferenceServiceFactories() {
405399
context -> new JinaAIService(httpFactory.get(), serviceComponents.get()),
406400
context -> new VoyageAIService(httpFactory.get(), serviceComponents.get()),
407401
context -> new DeepSeekService(httpFactory.get(), serviceComponents.get()),
408-
ElasticsearchInternalService::new
402+
ElasticsearchInternalService::new,
403+
context -> new CustomService(httpFactory.get(), serviceComponents.get())
409404
);
410-
411-
return Stream.concat(availableServices.stream(), conditionalServices.stream()).toList();
412405
}
413406

414407
@Override

0 commit comments

Comments
 (0)