Skip to content

Commit 2abeb2c

Browse files
author
David Roberts
authored
[ML] Hide deprecated APIs completely in serverless (#97408)
We have a couple of APIs that are deprecated: - Infer trained model deployment (note the "deployment" part - we are not deprecating model inference!) - Post anomaly detection job data There should be no need for anybody to use these APIs in serverless, even for internal debugging, so we can completely hide them in serverless.
1 parent 4a04681 commit 2abeb2c

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/inference/RestInferTrainedModelDeploymentAction.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
import org.elasticsearch.core.TimeValue;
1515
import org.elasticsearch.rest.BaseRestHandler;
1616
import org.elasticsearch.rest.RestRequest;
17-
import org.elasticsearch.rest.Scope;
18-
import org.elasticsearch.rest.ServerlessScope;
1917
import org.elasticsearch.rest.action.RestCancellableNodeClient;
2018
import org.elasticsearch.rest.action.RestToXContentListener;
2119
import org.elasticsearch.xpack.core.ml.action.InferModelAction;
@@ -30,7 +28,6 @@
3028
import static org.elasticsearch.rest.RestRequest.Method.POST;
3129
import static org.elasticsearch.xpack.ml.MachineLearning.BASE_PATH;
3230

33-
@ServerlessScope(Scope.INTERNAL)
3431
public class RestInferTrainedModelDeploymentAction extends BaseRestHandler {
3532

3633
static final String PATH = BASE_PATH + "trained_models/{" + TrainedModelConfig.MODEL_ID.getPreferredName() + "}/deployment/_infer";

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/rest/job/RestPostDataAction.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import org.elasticsearch.core.RestApiVersion;
1111
import org.elasticsearch.rest.BaseRestHandler;
1212
import org.elasticsearch.rest.RestRequest;
13-
import org.elasticsearch.rest.Scope;
14-
import org.elasticsearch.rest.ServerlessScope;
1513
import org.elasticsearch.rest.action.RestStatusToXContentListener;
1614
import org.elasticsearch.xpack.core.ml.action.PostDataAction;
1715
import org.elasticsearch.xpack.core.ml.job.config.Job;
@@ -23,7 +21,6 @@
2321
import static org.elasticsearch.xpack.ml.MachineLearning.BASE_PATH;
2422
import static org.elasticsearch.xpack.ml.MachineLearning.PRE_V7_BASE_PATH;
2523

26-
@ServerlessScope(Scope.INTERNAL)
2724
public class RestPostDataAction extends BaseRestHandler {
2825

2926
private static final String DEFAULT_RESET_START = "";

0 commit comments

Comments
 (0)