Backports the following commits to 7.x: - Remove Index Templates V2 feature flag (#56123)
This commit is contained in:
parent
75d4a4def4
commit
3cefe192a2
|
@ -531,7 +531,6 @@ subprojects {
|
|||
pluginManager.withPlugin('elasticsearch.testclusters') {
|
||||
testClusters.all {
|
||||
if (org.elasticsearch.gradle.info.BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.itv2_feature_enabled', 'true'
|
||||
systemProperty 'es.datastreams_feature_enabled', 'true'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,6 @@ testClusters.integTest {
|
|||
|
||||
// TODO: remove this once cname is prepended to transport.publish_address by default in 8.0
|
||||
systemProperty 'es.transport.cname_in_publish_address', 'true'
|
||||
systemProperty 'es.itv2_feature_enabled', 'true'
|
||||
}
|
||||
|
||||
// build the cluster with all plugins
|
||||
|
|
|
@ -334,7 +334,6 @@ task integTest(type: Test) {
|
|||
|
||||
include '**/*IT.class'
|
||||
if (org.elasticsearch.gradle.info.BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.itv2_feature_enabled', 'true'
|
||||
systemProperty 'es.datastreams_feature_enabled', 'true'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -396,21 +396,6 @@ public class ActionModule extends AbstractModule {
|
|||
private static final Logger logger = LogManager.getLogger(ActionModule.class);
|
||||
|
||||
private final boolean transportClient;
|
||||
|
||||
private static final boolean ITV2_FEATURE_ENABLED;
|
||||
|
||||
static {
|
||||
final String property = System.getProperty("es.itv2_feature_enabled");
|
||||
if (Build.CURRENT.isSnapshot() || "true".equals(property)) {
|
||||
ITV2_FEATURE_ENABLED = true;
|
||||
} else if ("false".equals(property) || property == null) {
|
||||
ITV2_FEATURE_ENABLED = false;
|
||||
} else {
|
||||
throw new IllegalArgumentException("expected es.itv2_feature_enabled to be unset, true, or false but was [" +
|
||||
property + "]");
|
||||
}
|
||||
}
|
||||
|
||||
private static final boolean DATASTREAMS_FEATURE_ENABLED;
|
||||
|
||||
static {
|
||||
|
@ -561,15 +546,13 @@ public class ActionModule extends AbstractModule {
|
|||
actions.register(PutIndexTemplateAction.INSTANCE, TransportPutIndexTemplateAction.class);
|
||||
actions.register(GetIndexTemplatesAction.INSTANCE, TransportGetIndexTemplatesAction.class);
|
||||
actions.register(DeleteIndexTemplateAction.INSTANCE, TransportDeleteIndexTemplateAction.class);
|
||||
if (ITV2_FEATURE_ENABLED) {
|
||||
actions.register(PutComponentTemplateAction.INSTANCE, TransportPutComponentTemplateAction.class);
|
||||
actions.register(GetComponentTemplateAction.INSTANCE, TransportGetComponentTemplateAction.class);
|
||||
actions.register(DeleteComponentTemplateAction.INSTANCE, TransportDeleteComponentTemplateAction.class);
|
||||
actions.register(PutIndexTemplateV2Action.INSTANCE, TransportPutIndexTemplateV2Action.class);
|
||||
actions.register(GetIndexTemplateV2Action.INSTANCE, TransportGetIndexTemplateV2Action.class);
|
||||
actions.register(DeleteIndexTemplateV2Action.INSTANCE, TransportDeleteIndexTemplateV2Action.class);
|
||||
actions.register(SimulateIndexTemplateAction.INSTANCE, TransportSimulateIndexTemplateAction.class);
|
||||
}
|
||||
actions.register(PutComponentTemplateAction.INSTANCE, TransportPutComponentTemplateAction.class);
|
||||
actions.register(GetComponentTemplateAction.INSTANCE, TransportGetComponentTemplateAction.class);
|
||||
actions.register(DeleteComponentTemplateAction.INSTANCE, TransportDeleteComponentTemplateAction.class);
|
||||
actions.register(PutIndexTemplateV2Action.INSTANCE, TransportPutIndexTemplateV2Action.class);
|
||||
actions.register(GetIndexTemplateV2Action.INSTANCE, TransportGetIndexTemplateV2Action.class);
|
||||
actions.register(DeleteIndexTemplateV2Action.INSTANCE, TransportDeleteIndexTemplateV2Action.class);
|
||||
actions.register(SimulateIndexTemplateAction.INSTANCE, TransportSimulateIndexTemplateAction.class);
|
||||
actions.register(ValidateQueryAction.INSTANCE, TransportValidateQueryAction.class);
|
||||
actions.register(RefreshAction.INSTANCE, TransportRefreshAction.class);
|
||||
actions.register(FlushAction.INSTANCE, TransportFlushAction.class);
|
||||
|
@ -705,15 +688,13 @@ public class ActionModule extends AbstractModule {
|
|||
registerHandler.accept(new RestGetIndexTemplateAction());
|
||||
registerHandler.accept(new RestPutIndexTemplateAction());
|
||||
registerHandler.accept(new RestDeleteIndexTemplateAction());
|
||||
if (ITV2_FEATURE_ENABLED) {
|
||||
registerHandler.accept(new RestPutComponentTemplateAction());
|
||||
registerHandler.accept(new RestGetComponentTemplateAction());
|
||||
registerHandler.accept(new RestDeleteComponentTemplateAction());
|
||||
registerHandler.accept(new RestPutIndexTemplateV2Action());
|
||||
registerHandler.accept(new RestGetIndexTemplateV2Action());
|
||||
registerHandler.accept(new RestDeleteIndexTemplateV2Action());
|
||||
registerHandler.accept(new RestSimulateIndexTemplateAction());
|
||||
}
|
||||
registerHandler.accept(new RestPutComponentTemplateAction());
|
||||
registerHandler.accept(new RestGetComponentTemplateAction());
|
||||
registerHandler.accept(new RestDeleteComponentTemplateAction());
|
||||
registerHandler.accept(new RestPutIndexTemplateV2Action());
|
||||
registerHandler.accept(new RestGetIndexTemplateV2Action());
|
||||
registerHandler.accept(new RestDeleteIndexTemplateV2Action());
|
||||
registerHandler.accept(new RestSimulateIndexTemplateAction());
|
||||
|
||||
registerHandler.accept(new RestPutMappingAction());
|
||||
registerHandler.accept(new RestGetMappingAction());
|
||||
|
|
Loading…
Reference in New Issue