Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vector tile feature flag #76068

Merged
merged 3 commits into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions x-pack/plugin/vector-tile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ testClusters.all {
setting 'xpack.license.self_generated.type', 'trial'
testDistribution = 'DEFAULT'
setting 'xpack.security.enabled', 'false'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.vector_tile_feature_flag_registered', 'true'
}
}

tasks.named("test").configure {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.vector_tile_feature_flag_registered', 'true'
}
}

tasks.named("thirdPartyAudit").configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
*/
package org.elasticsearch.xpack.vectortile;

import org.elasticsearch.Build;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.IndexScopedSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsFilter;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.license.XPackLicenseState;
import org.elasticsearch.plugins.ActionPlugin;
import org.elasticsearch.plugins.Plugin;
Expand All @@ -35,20 +33,6 @@ protected XPackLicenseState getLicenseState() {
return XPackPlugin.getSharedLicenseState();
}

private static final Boolean VECTOR_TILE_FEATURE_FLAG_REGISTERED;

static {
final String property = System.getProperty("es.vector_tile_feature_flag_registered");
if (Build.CURRENT.isSnapshot() && property != null) {
throw new IllegalArgumentException("es.vector_tile_feature_flag_registered is only supported in non-snapshot builds");
}
VECTOR_TILE_FEATURE_FLAG_REGISTERED = Booleans.parseBoolean(property, null);
}

public boolean isVectorTileEnabled() {
return Build.CURRENT.isSnapshot() || (VECTOR_TILE_FEATURE_FLAG_REGISTERED != null && VECTOR_TILE_FEATURE_FLAG_REGISTERED);
}

@Override
public List<RestHandler> getRestHandlers(
Settings settings,
Expand All @@ -59,11 +43,7 @@ public List<RestHandler> getRestHandlers(
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster
) {
if (isVectorTileEnabled()) {
return List.of(new RestVectorTileAction());
} else {
return List.of();
}
return List.of(new RestVectorTileAction());
}

@Override
Expand Down