Skip to content

Commit

Permalink
Remove Index Templates V2 feature flag (#56123)
Browse files Browse the repository at this point in the history
This will be available in the next minor release, so this removes the feature flag prior to the
feature freeze date.

Relates to #53101
  • Loading branch information
dakrone authored May 4, 2020
1 parent b3f4835 commit eb44984
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 35 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,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'
}
}
Expand Down
1 change: 0 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,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'
}
}
Expand Down
46 changes: 14 additions & 32 deletions server/src/main/java/org/elasticsearch/action/ActionModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,6 @@ public class ActionModule extends AbstractModule {

private static final Logger logger = LogManager.getLogger(ActionModule.class);

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 {
Expand Down Expand Up @@ -550,15 +536,13 @@ public <Request extends ActionRequest, Response extends ActionResponse> void reg
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);
Expand Down Expand Up @@ -702,15 +686,13 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
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());
Expand Down

0 comments on commit eb44984

Please sign in to comment.