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

V_7 deprecation logging set to critical #118298

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
11 changes: 11 additions & 0 deletions docs/changelog/118298.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pr: 118298
summary: Enhancement/v7 critical deprecation logging
area: Infra/REST API
type: deprecation
issues: []
deprecation:
title: Enhancement/v7 critical deprecation logging
area: REST API
details: Please describe the details of this change for the release notes. You can
JVerwolf marked this conversation as resolved.
Show resolved Hide resolved
use asciidoc.
impact: Please describe the impact of this change to users
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.elasticsearch.script.mustache;

import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.rest.BaseRestHandler;
Expand Down Expand Up @@ -47,8 +48,12 @@ public List<Route> routes() {
new Route(POST, "/_msearch/template"),
new Route(GET, "/{index}/_msearch/template"),
new Route(POST, "/{index}/_msearch/template"),
Route.builder(GET, "/{index}/{type}/_msearch/template").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/{type}/_msearch/template").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(GET, "/{index}/{type}/_msearch/template")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/{type}/_msearch/template")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.rest.BaseRestHandler;
Expand Down Expand Up @@ -50,10 +51,10 @@ public List<Route> routes() {
new Route(GET, "/{index}/_search/template"),
new Route(POST, "/{index}/_search/template"),
Route.builder(GET, "/{index}/{type}/_search/template")
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7)
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/{type}/_search/template")
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7)
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.elasticsearch.reindex;

import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.index.reindex.DeleteByQueryAction;
Expand Down Expand Up @@ -43,7 +44,7 @@ public List<Route> routes() {
return List.of(
new Route(POST, "/{index}/_delete_by_query"),
Route.builder(POST, "/{index}/{type}/_delete_by_query")
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7)
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.elasticsearch.reindex;

import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.index.reindex.UpdateByQueryAction;
Expand Down Expand Up @@ -44,7 +45,7 @@ public List<Route> routes() {
return List.of(
new Route(POST, "/{index}/_update_by_query"),
Route.builder(POST, "/{index}/{type}/_update_by_query")
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7)
.deprecated(RestSearchAction.TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.elasticsearch.action.admin.cluster.configuration.TransportAddVotingConfigExclusionsAction;
import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.rest.BaseRestHandler;
Expand Down Expand Up @@ -42,7 +43,7 @@ public List<Route> routes() {
return List.of(
new Route(POST, "/_cluster/voting_config_exclusions"),
Route.builder(POST, "/_cluster/voting_config_exclusions/{node_name}")
.deprecated(DEPRECATION_MESSAGE, RestApiVersion.V_7)
.deprecated(DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.action.admin.cluster.node.hotthreads.TransportNodesHotThreadsAction;
import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.monitor.jvm.HotThreads;
import org.elasticsearch.rest.BaseRestHandler;
Expand Down Expand Up @@ -78,20 +79,22 @@ public List<Route> routes() {
new Route(GET, "/_nodes/{nodeId}/hot_threads"),

Route.builder(GET, "/_cluster/nodes/hot_threads")
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_HOT_THREADS, RestApiVersion.V_7)
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_HOT_THREADS, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_cluster/nodes/{nodeId}/hot_threads")
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOT_THREADS, RestApiVersion.V_7)
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOT_THREADS, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_cluster/nodes/hotthreads")
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_HOTTHREADS, RestApiVersion.V_7)
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_HOTTHREADS, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_cluster/nodes/{nodeId}/hotthreads")
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOTTHREADS, RestApiVersion.V_7)
.deprecated(DEPRECATED_MESSAGE_CLUSTER_NODES_NODEID_HOTTHREADS, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_nodes/hotthreads")
.deprecated(DEPRECATED_MESSAGE_NODES_HOTTHREADS, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_nodes/hotthreads").deprecated(DEPRECATED_MESSAGE_NODES_HOTTHREADS, RestApiVersion.V_7).build(),
Route.builder(GET, "/_nodes/{nodeId}/hotthreads")
.deprecated(DEPRECATED_MESSAGE_NODES_NODEID_HOTTHREADS, RestApiVersion.V_7)
.deprecated(DEPRECATED_MESSAGE_NODES_NODEID_HOTTHREADS, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ public List<Route> routes() {
return List.of(
new Route(GET, "/_mapping/field/{fields}"),
new Route(GET, "/{index}/_mapping/field/{fields}"),
Route.builder(GET, "/_mapping/{type}/field/{fields}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/{type}/_mapping/field/{fields}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/_mapping/{type}/field/{fields}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(GET, "/_mapping/{type}/field/{fields}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/{index}/{type}/_mapping/field/{fields}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/{index}/_mapping/{type}/field/{fields}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,23 @@ public List<Route> routes() {
return List.of(
new Route(GET, "/_mapping"),
new Route(GET, "/_mappings"),
Route.builder(GET, "/{index}/{type}/_mapping").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/{type}/_mapping")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
new Route(GET, "/{index}/_mapping"),
new Route(GET, "/{index}/_mappings"),
Route.builder(GET, "/{index}/_mappings/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(HEAD, "/{index}/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(GET, "/{index}/_mappings/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/{index}/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(HEAD, "/{index}/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,42 @@ public List<Route> routes() {
new Route(PUT, "/{index}/_mapping/"),
new Route(POST, "/{index}/_mappings/"),
new Route(PUT, "/{index}/_mappings/"),
Route.builder(POST, "/{index}/{type}/_mapping").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/{index}/{type}/_mapping").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/{index}/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/_mapping/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/{type}/_mappings").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/{index}/{type}/_mappings").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/_mappings/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/{index}/_mappings/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/_mappings/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/_mappings/{type}").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(POST, "/{index}/{type}/_mapping")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/{index}/{type}/_mapping")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/{index}/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/_mapping/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/{type}/_mappings")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/{index}/{type}/_mappings")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/_mappings/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/{index}/_mappings/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/_mappings/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/_mappings/{type}")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.action.support.broadcast.BroadcastResponse;
import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.RestChannel;
Expand All @@ -37,10 +38,14 @@ public class RestSyncedFlushAction extends BaseRestHandler {
@Override
public List<Route> routes() {
return List.of(
Route.builder(GET, "/_flush/synced").deprecated(DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/_flush/synced").deprecated(DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/_flush/synced").deprecated(DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/_flush/synced").deprecated(DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(GET, "/_flush/synced").deprecated(DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7).build(),
Route.builder(POST, "/_flush/synced").deprecated(DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/_flush/synced")
.deprecated(DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/_flush/synced")
.deprecated(DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.elasticsearch.rest.action.admin.indices;

import org.elasticsearch.client.internal.node.NodeClient;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.rest.BaseRestHandler;
import org.elasticsearch.rest.RestRequest;
Expand All @@ -29,10 +30,18 @@ public class RestUpgradeActionDeprecated extends BaseRestHandler {
@Override
public List<Route> routes() {
return List.of(
Route.builder(POST, "/_upgrade").deprecated(UPGRADE_API_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/_upgrade").deprecated(UPGRADE_API_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/_upgrade").deprecated(UPGRADE_API_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(GET, "/{index}/_upgrade").deprecated(UPGRADE_API_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(POST, "/_upgrade")
.deprecated(UPGRADE_API_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/_upgrade")
.deprecated(UPGRADE_API_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/_upgrade")
.deprecated(UPGRADE_API_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(GET, "/{index}/_upgrade")
.deprecated(UPGRADE_API_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ public List<Route> routes() {
new Route(POST, "/_validate/query"),
new Route(GET, "/{index}/_validate/query"),
new Route(POST, "/{index}/_validate/query"),
Route.builder(GET, "/{index}/{type}/_validate/query").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(POST, "/{index}/{type}/_validate/query").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(GET, "/{index}/{type}/_validate/query")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(POST, "/{index}/{type}/_validate/query")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.bytes.CompositeBytesReference;
import org.elasticsearch.common.bytes.ReleasableBytesReference;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.Releasable;
import org.elasticsearch.core.Releasables;
Expand Down Expand Up @@ -79,8 +80,12 @@ public List<Route> routes() {
new Route(PUT, "/_bulk"),
new Route(POST, "/{index}/_bulk"),
new Route(PUT, "/{index}/_bulk"),
Route.builder(POST, "/{index}/{type}/_bulk").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build(),
Route.builder(PUT, "/{index}/{type}/_bulk").deprecated(TYPES_DEPRECATION_MESSAGE, RestApiVersion.V_7).build()
Route.builder(POST, "/{index}/{type}/_bulk")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build(),
Route.builder(PUT, "/{index}/{type}/_bulk")
.deprecated(TYPES_DEPRECATION_MESSAGE, DeprecationLogger.CRITICAL, RestApiVersion.V_7)
.build()
);
}

Expand Down
Loading