From 7e74d3b002330717779d185cb8f4a55cf90cc08f Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 20 Jan 2025 11:31:07 +0400 Subject: [PATCH 1/2] Remove indices.unfreeze API --- output/openapi/elasticsearch-openapi.json | 109 ---------- output/schema/schema.json | 199 ------------------ output/typescript/types.ts | 15 -- specification/_doc_ids/table.csv | 1 - .../_json_spec/indices.unfreeze.json | 59 ------ .../unfreeze/IndicesUnfreezeRequest.ts | 86 -------- .../unfreeze/IndicesUnfreezeResponse.ts | 25 --- 7 files changed, 494 deletions(-) delete mode 100644 specification/_json_spec/indices.unfreeze.json delete mode 100644 specification/indices/unfreeze/IndicesUnfreezeRequest.ts delete mode 100644 specification/indices/unfreeze/IndicesUnfreezeResponse.ts diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index dc0a00296e..5e6bb38fd8 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -15677,115 +15677,6 @@ "x-state": "Added in 1.3.0" } }, - "/{index}/_unfreeze": { - "post": { - "tags": [ - "indices" - ], - "summary": "Unfreeze an index", - "description": "When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.", - "operationId": "indices-unfreeze", - "parameters": [ - { - "in": "path", - "name": "index", - "description": "Identifier for the index.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:IndexName" - }, - "style": "simple" - }, - { - "in": "query", - "name": "allow_no_indices", - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "expand_wildcards", - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:ExpandWildcards" - }, - "style": "form" - }, - { - "in": "query", - "name": "ignore_unavailable", - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "master_timeout", - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_active_shards", - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "acknowledged": { - "type": "boolean" - }, - "shards_acknowledged": { - "type": "boolean" - } - }, - "required": [ - "acknowledged", - "shards_acknowledged" - ] - } - } - } - } - }, - "deprecated": true, - "x-state": "Added in 6.6.0" - } - }, "/_aliases": { "post": { "tags": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 05e0da9b54..e964109a02 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8613,51 +8613,6 @@ } ] }, - { - "availability": { - "stack": { - "since": "6.6.0", - "stability": "stable" - } - }, - "deprecation": { - "description": "", - "version": "7.14.0" - }, - "description": "Unfreeze an index.\nWhen a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.", - "docId": "unfreeze-index-api", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/unfreeze-index-api.html", - "name": "indices.unfreeze", - "privileges": { - "index": [ - "manage" - ] - }, - "request": { - "name": "Request", - "namespace": "indices.unfreeze" - }, - "requestBodyRequired": false, - "response": { - "name": "Response", - "namespace": "indices.unfreeze" - }, - "responseMediaType": [ - "application/json" - ], - "urls": [ - { - "deprecation": { - "description": "Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release.", - "version": "7.14.0" - }, - "methods": [ - "POST" - ], - "path": "/{index}/_unfreeze" - } - ] - }, { "availability": { "serverless": { @@ -143508,160 +143463,6 @@ ], "specLocation": "indices/stats/types.ts#L182-L184" }, - { - "kind": "request", - "attachedBehaviors": [ - "CommonQueryParameters" - ], - "body": { - "kind": "no_body" - }, - "deprecation": { - "description": "", - "version": "7.14.0" - }, - "description": "Unfreeze an index.\nWhen a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.", - "inherits": { - "type": { - "name": "RequestBase", - "namespace": "_types" - } - }, - "name": { - "name": "Request", - "namespace": "indices.unfreeze" - }, - "path": [ - { - "description": "Identifier for the index.", - "name": "index", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - } - ], - "query": [ - { - "description": "If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.\nThis behavior applies even if the request targets other open indices.", - "name": "allow_no_indices", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "Type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", - "name": "expand_wildcards", - "required": false, - "serverDefault": "open", - "type": { - "kind": "instance_of", - "type": { - "name": "ExpandWildcards", - "namespace": "_types" - } - } - }, - { - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "name": "ignore_unavailable", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "name": "master_timeout", - "required": false, - "serverDefault": "30s", - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - }, - { - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "name": "timeout", - "required": false, - "serverDefault": "30s", - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - }, - { - "description": "The number of shard copies that must be active before proceeding with the operation.\nSet to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).", - "name": "wait_for_active_shards", - "required": false, - "serverDefault": "1", - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - ], - "specLocation": "indices/unfreeze/IndicesUnfreezeRequest.ts#L24-L86" - }, - { - "kind": "response", - "body": { - "kind": "properties", - "properties": [ - { - "name": "acknowledged", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "name": "shards_acknowledged", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - } - ] - }, - "name": { - "name": "Response", - "namespace": "indices.unfreeze" - }, - "specLocation": "indices/unfreeze/IndicesUnfreezeResponse.ts#L20-L25" - }, { "kind": "interface", "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 9e61a16e60..fb5d902c3c 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12793,21 +12793,6 @@ export interface IndicesStatsShardsTotalStats { total_count: long } -export interface IndicesUnfreezeRequest extends RequestBase { - index: IndexName - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - master_timeout?: Duration - timeout?: Duration - wait_for_active_shards?: string -} - -export interface IndicesUnfreezeResponse { - acknowledged: boolean - shards_acknowledged: boolean -} - export interface IndicesUpdateAliasesAction { add?: IndicesUpdateAliasesAddAction remove?: IndicesUpdateAliasesRemoveAction diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 530cb5856a..8e0e1b45ec 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -744,7 +744,6 @@ terminate-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{bra time-value,https://github.com/elastic/elasticsearch/blob/{branch}/libs/core/src/main/java/org/elasticsearch/core/TimeValue.java time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html trim-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/trim-processor.html -unfreeze-index-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/unfreeze-index-api.html update-dfanalytics,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-dfanalytics.html update-license,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-license.html update-transform,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-transform.html diff --git a/specification/_json_spec/indices.unfreeze.json b/specification/_json_spec/indices.unfreeze.json deleted file mode 100644 index c75dcab207..0000000000 --- a/specification/_json_spec/indices.unfreeze.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "indices.unfreeze": { - "documentation": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html", - "description": "Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again." - }, - "stability": "stable", - "visibility": "public", - "headers": { - "accept": ["application/json"] - }, - "url": { - "paths": [ - { - "path": "/{index}/_unfreeze", - "methods": ["POST"], - "parts": { - "index": { - "type": "string", - "description": "The name of the index to unfreeze" - } - }, - "deprecated": { - "version": "7.14.0", - "description": "Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release." - } - } - ] - }, - "params": { - "timeout": { - "type": "time", - "description": "Explicit operation timeout" - }, - "master_timeout": { - "type": "time", - "description": "Specify timeout for connection to master" - }, - "ignore_unavailable": { - "type": "boolean", - "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)" - }, - "allow_no_indices": { - "type": "boolean", - "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)" - }, - "expand_wildcards": { - "type": "enum", - "options": ["open", "closed", "hidden", "none", "all"], - "default": "closed", - "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." - }, - "wait_for_active_shards": { - "type": "string", - "description": "Sets the number of active shards to wait for before the operation returns." - } - } - } -} diff --git a/specification/indices/unfreeze/IndicesUnfreezeRequest.ts b/specification/indices/unfreeze/IndicesUnfreezeRequest.ts deleted file mode 100644 index 20898408cb..0000000000 --- a/specification/indices/unfreeze/IndicesUnfreezeRequest.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { RequestBase } from '@_types/Base' -import { ExpandWildcards, IndexName } from '@_types/common' -import { Duration } from '@_types/Time' - -/** - * Unfreeze an index. - * When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again. - * @rest_spec_name indices.unfreeze - * @availability stack since=6.6.0 stability=stable - * @index_privileges manage - * @doc_id unfreeze-index-api - * @deprecated 7.14.0 - */ -export interface Request extends RequestBase { - urls: [ - { - /** @deprecated 7.14.0 Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release. */ - path: '/{index}/_unfreeze' - methods: ['POST'] - } - ] - path_parts: { - /** - * Identifier for the index. - */ - index: IndexName - } - query_parameters: { - /** - * If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. - * @server_default true - */ - allow_no_indices?: boolean - /** - * Type of index that wildcard patterns can match. - * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. - * Supports comma-separated values, such as `open,hidden`. - * Valid values are: `all`, `open`, `closed`, `hidden`, `none`. - * @server_default open - */ - expand_wildcards?: ExpandWildcards - /** - * If `false`, the request returns an error if it targets a missing or closed index. - * @server_default false - */ - ignore_unavailable?: boolean - /** - * Period to wait for a connection to the master node. - * If no response is received before the timeout expires, the request fails and returns an error. - * @server_default 30s - */ - master_timeout?: Duration - /** - * Period to wait for a response. - * If no response is received before the timeout expires, the request fails and returns an error. - * @server_default 30s - */ - timeout?: Duration - /** - * The number of shard copies that must be active before proceeding with the operation. - * Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). - * @server_default 1 - */ - wait_for_active_shards?: string - } -} diff --git a/specification/indices/unfreeze/IndicesUnfreezeResponse.ts b/specification/indices/unfreeze/IndicesUnfreezeResponse.ts deleted file mode 100644 index 55df0ae55a..0000000000 --- a/specification/indices/unfreeze/IndicesUnfreezeResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export class Response { - body: { - acknowledged: boolean - shards_acknowledged: boolean - } -} From 04ab93b3650962f2e3f30d8b1faaea6e4c6ec28c Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 20 Jan 2025 11:46:51 +0400 Subject: [PATCH 2/2] Do not validate removed APIs --- .github/validate-pr/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/validate-pr/index.js b/.github/validate-pr/index.js index 53dc3dec79..867998de04 100644 --- a/.github/validate-pr/index.js +++ b/.github/validate-pr/index.js @@ -53,7 +53,7 @@ async function run () { per_page: 100 }) if (data.length > 0) { - files.push(...data.map(entry => entry.filename)) + files.push(...data.filter(entry => entry.status !== 'deleted').map(entry => entry.filename)) page += 1 } else { break