Skip to content

Commit

Permalink
Revert "Enable Universal Profiling as Enterprise feature (elastic#100333
Browse files Browse the repository at this point in the history
)"

This reverts commit dfaec0d.
  • Loading branch information
danielmitterdorfer committed Oct 9, 2023
1 parent dfaec0d commit 6e1160e
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 310 deletions.
5 changes: 0 additions & 5 deletions docs/changelog/100333.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/reference/rest-api/info.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ Example response:
"enterprise_search": {
"available": true,
"enabled": true
},
"universal_profiling": {
"available": true,
"enabled": true
}
},
"tagline" : "You know, for X"
Expand Down
4 changes: 0 additions & 4 deletions docs/reference/rest-api/usage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,6 @@ GET /_xpack/usage
"min_rule_count": 0,
"max_rule_count": 0
}
},
"universal_profiling" : {
"available" : true,
"enabled" : true
}
}
------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions server/src/main/java/org/elasticsearch/TransportVersions.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ static TransportVersion def(int id) {
public static final TransportVersion NESTED_KNN_VECTOR_QUERY_V = def(8_511_00_0);
public static final TransportVersion ML_PACKAGE_LOADER_PLATFORM_ADDED = def(8_512_00_0);
public static final TransportVersion PLUGIN_DESCRIPTOR_OPTIONAL_CLASSNAME = def(8_513_00_0);
public static final TransportVersion UNIVERSAL_PROFILING_LICENSE_ADDED = def(8_514_00_0);

/*
* STOP! READ THIS FIRST! No, really,
* ____ _____ ___ ____ _ ____ _____ _ ____ _____ _ _ ___ ____ _____ ___ ____ ____ _____ _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.elasticsearch.xpack.core.aggregatemetric.AggregateMetricFeatureSetUsage;
import org.elasticsearch.xpack.core.analytics.AnalyticsFeatureSetUsage;
import org.elasticsearch.xpack.core.application.EnterpriseSearchFeatureSetUsage;
import org.elasticsearch.xpack.core.application.ProfilingUsage;
import org.elasticsearch.xpack.core.archive.ArchiveFeatureSetUsage;
import org.elasticsearch.xpack.core.ccr.AutoFollowMetadata;
import org.elasticsearch.xpack.core.datastreams.DataStreamFeatureSetUsage;
Expand Down Expand Up @@ -278,8 +277,7 @@ public List<NamedWriteableRegistry.Entry> getNamedWriteables() {
XPackFeatureSet.Usage.class,
XPackField.ENTERPRISE_SEARCH,
EnterpriseSearchFeatureSetUsage::new
),
new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.UNIVERSAL_PROFILING, ProfilingUsage::new)
)
).filter(Objects::nonNull).toList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public final class XPackField {

/** Name constant for the redact processor feature. */
public static final String REDACT_PROCESSOR = "redact_processor";
/* Name for Universal Profiling. */
public static final String UNIVERSAL_PROFILING = "universal_profiling";

private XPackField() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class XPackInfoFeatureAction extends ActionType<XPackInfoFeatureResponse>
public static final XPackInfoFeatureAction AGGREGATE_METRIC = new XPackInfoFeatureAction(XPackField.AGGREGATE_METRIC);
public static final XPackInfoFeatureAction ARCHIVE = new XPackInfoFeatureAction(XPackField.ARCHIVE);
public static final XPackInfoFeatureAction ENTERPRISE_SEARCH = new XPackInfoFeatureAction(XPackField.ENTERPRISE_SEARCH);
public static final XPackInfoFeatureAction UNIVERSAL_PROFILING = new XPackInfoFeatureAction(XPackField.UNIVERSAL_PROFILING);

public static final List<XPackInfoFeatureAction> ALL;
static {
Expand Down Expand Up @@ -81,8 +80,7 @@ public class XPackInfoFeatureAction extends ActionType<XPackInfoFeatureResponse>
DATA_TIERS,
AGGREGATE_METRIC,
ARCHIVE,
ENTERPRISE_SEARCH,
UNIVERSAL_PROFILING
ENTERPRISE_SEARCH
)
);
ALL = Collections.unmodifiableList(actions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class XPackUsageFeatureAction extends ActionType<XPackUsageFeatureRespons
public static final XPackUsageFeatureAction HEALTH = new XPackUsageFeatureAction(XPackField.HEALTH_API);
public static final XPackUsageFeatureAction REMOTE_CLUSTERS = new XPackUsageFeatureAction(XPackField.REMOTE_CLUSTERS);
public static final XPackUsageFeatureAction ENTERPRISE_SEARCH = new XPackUsageFeatureAction(XPackField.ENTERPRISE_SEARCH);
public static final XPackUsageFeatureAction UNIVERSAL_PROFILING = new XPackUsageFeatureAction(XPackField.UNIVERSAL_PROFILING);

static final List<XPackUsageFeatureAction> ALL = List.of(
AGGREGATE_METRIC,
Expand Down Expand Up @@ -79,8 +78,7 @@ public class XPackUsageFeatureAction extends ActionType<XPackUsageFeatureRespons
ARCHIVE,
HEALTH,
REMOTE_CLUSTERS,
ENTERPRISE_SEARCH,
UNIVERSAL_PROFILING
ENTERPRISE_SEARCH
);

// public for testing
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.datastreams.DataStreamsPlugin;
import org.elasticsearch.license.LicenseSettings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.netty4.Netty4Plugin;
import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin;
import org.elasticsearch.xpack.core.XPackSettings;
import org.elasticsearch.xpack.core.ilm.LifecycleSettings;
import org.elasticsearch.xpack.ilm.IndexLifecycle;
Expand All @@ -37,8 +37,9 @@ public abstract class ProfilingTestCase extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return List.of(
LocalStateCompositeXPackPlugin.class,
DataStreamsPlugin.class,
LocalStateProfilingXPackPlugin.class,
ProfilingPlugin.class,
IndexLifecycle.class,
UnsignedLongMapperPlugin.class,
VersionFieldPlugin.class,
Expand All @@ -57,7 +58,6 @@ protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) {
// .put(LicenseSettings.SELF_GENERATED_LICENSE_TYPE.getKey(), "trial")
// Disable ILM history index so that the tests don't have to clean it up
.put(LifecycleSettings.LIFECYCLE_HISTORY_INDEX_ENABLED_SETTING.getKey(), false)
.put(LicenseSettings.SELF_GENERATED_LICENSE_TYPE.getKey(), "trial")
.build();
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.watcher.ResourceWatcherService;
import org.elasticsearch.xcontent.NamedXContentRegistry;
import org.elasticsearch.xpack.core.XPackPlugin;
import org.elasticsearch.xpack.core.XPackSettings;
import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction;
import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;

import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -111,12 +108,10 @@ public Collection<Object> createComponents(
registry.get().initialize();
indexManager.get().initialize();
dataStreamManager.get().initialize();
return List.of(registry.get(), indexManager.get(), dataStreamManager.get());
} else {
return Collections.emptyList();
}
return Collections.singletonList(createLicenseChecker());
}

protected ProfilingLicenseChecker createLicenseChecker() {
return new ProfilingLicenseChecker(XPackPlugin::getSharedLicenseState);
}

public void updateCheckOutdatedIndices(boolean newValue) {
Expand Down Expand Up @@ -184,9 +179,7 @@ public static ExecutorBuilder<?> responseExecutorBuilder() {
return List.of(
new ActionHandler<>(GetStackTracesAction.INSTANCE, TransportGetStackTracesAction.class),
new ActionHandler<>(GetFlamegraphAction.INSTANCE, TransportGetFlamegraphAction.class),
new ActionHandler<>(GetStatusAction.INSTANCE, TransportGetStatusAction.class),
new ActionHandler<>(XPackUsageFeatureAction.UNIVERSAL_PROFILING, ProfilingUsageTransportAction.class),
new ActionHandler<>(XPackInfoFeatureAction.UNIVERSAL_PROFILING, ProfilingInfoTransportAction.class)
new ActionHandler<>(GetStatusAction.INSTANCE, TransportGetStatusAction.class)
);
}

Expand Down

This file was deleted.

Loading

0 comments on commit 6e1160e

Please sign in to comment.