Skip to content

Commit d45d6a7

Browse files
Merge branch 'main' into simplified-retrievers_empty-fields-fix
2 parents d2a7a0a + d16271b commit d45d6a7

File tree

53 files changed

+3141
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3141
-279
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ steps:
6565
timeout_in_minutes: 300
6666
matrix:
6767
setup:
68-
BWC_VERSION: ["8.17.9", "8.18.3", "8.19.0", "9.0.4", "9.1.0"]
68+
BWC_VERSION: ["8.17.9", "8.18.4", "8.19.0", "9.0.4", "9.1.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ steps:
318318
env:
319319
BWC_VERSION: 8.17.9
320320

321-
- label: "{{matrix.image}} / 8.18.3 / packaging-tests-upgrade"
322-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.3
321+
- label: "{{matrix.image}} / 8.18.4 / packaging-tests-upgrade"
322+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.4
323323
timeout_in_minutes: 300
324324
matrix:
325325
setup:
@@ -332,7 +332,7 @@ steps:
332332
machineType: custom-16-32768
333333
buildDirectory: /dev/shm/bk
334334
env:
335-
BWC_VERSION: 8.18.3
335+
BWC_VERSION: 8.18.4
336336

337337
- label: "{{matrix.image}} / 8.19.0 / packaging-tests-upgrade"
338338
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.0

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ steps:
344344
- signal_reason: agent_stop
345345
limit: 3
346346

347-
- label: 8.18.3 / bwc
348-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.18.3#bwcTest
347+
- label: 8.18.4 / bwc
348+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.18.4#bwcTest
349349
timeout_in_minutes: 300
350350
agents:
351351
provider: gcp
@@ -354,7 +354,7 @@ steps:
354354
buildDirectory: /dev/shm/bk
355355
preemptible: true
356356
env:
357-
BWC_VERSION: 8.18.3
357+
BWC_VERSION: 8.18.4
358358
retry:
359359
automatic:
360360
- exit_status: "-1"
@@ -487,7 +487,7 @@ steps:
487487
setup:
488488
ES_RUNTIME_JAVA:
489489
- openjdk21
490-
BWC_VERSION: ["8.17.9", "8.18.3", "8.19.0", "9.0.4", "9.1.0"]
490+
BWC_VERSION: ["8.17.9", "8.18.4", "8.19.0", "9.0.4", "9.1.0"]
491491
agents:
492492
provider: gcp
493493
image: family/elasticsearch-ubuntu-2404
@@ -531,7 +531,7 @@ steps:
531531
ES_RUNTIME_JAVA:
532532
- openjdk21
533533
- openjdk23
534-
BWC_VERSION: ["8.17.9", "8.18.3", "8.19.0", "9.0.4", "9.1.0"]
534+
BWC_VERSION: ["8.17.9", "8.18.4", "8.19.0", "9.0.4", "9.1.0"]
535535
agents:
536536
provider: gcp
537537
image: family/elasticsearch-ubuntu-2404

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ BWC_VERSION:
1717
- "8.15.5"
1818
- "8.16.6"
1919
- "8.17.9"
20-
- "8.18.3"
20+
- "8.18.4"
2121
- "8.19.0"
2222
- "9.0.4"
2323
- "9.1.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BWC_VERSION:
22
- "8.17.9"
3-
- "8.18.3"
3+
- "8.18.4"
44
- "8.19.0"
55
- "9.0.4"
66
- "9.1.0"

docs/changelog/129128.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129128
2+
summary: Add RemoveBlock API to allow `DELETE /{index}/_block/{block}`
3+
area: Indices APIs
4+
type: enhancement
5+
issues: []

docs/reference/elasticsearch/index-settings/index-block.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,106 @@ The API returns following response:
143143
}
144144
```
145145

146+
147+
## Remove index block API [remove-index-block]
148+
149+
Removes an index block from an index.
150+
151+
```console
152+
DELETE /my-index-000001/_block/write
153+
```
154+
155+
156+
### {{api-request-title}} [remove-index-block-api-request]
157+
158+
`DELETE /<index>/_block/<block>`
159+
160+
161+
### {{api-path-parms-title}} [remove-index-block-api-path-params]
162+
163+
`<index>`
164+
: (Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.
165+
166+
By default, you must explicitly name the indices you are removing blocks from. To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`. You can update this setting in the `elasticsearch.yml` file or using the [cluster update settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) API.
167+
168+
169+
`<block>`
170+
: (Required, string) Block type to remove from the index.
171+
172+
**Valid values**:
173+
174+
`metadata`
175+
: Remove metadata block, allowing metadata changes.
176+
177+
`read`
178+
: Remove read block, allowing read operations.
179+
180+
`read_only`
181+
: Remove read-only block, allowing write operations and metadata changes.
182+
183+
`write`
184+
: Remove write block, allowing write operations.
185+
186+
::::
187+
188+
189+
190+
### {{api-query-parms-title}} [remove-index-block-api-query-params]
191+
192+
`allow_no_indices`
193+
: (Optional, Boolean) If `false`, the request returns an error if any wildcard expression, [index alias](docs-content://manage-data/data-store/aliases.md), or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
194+
195+
Defaults to `true`.
196+
197+
198+
`expand_wildcards`
199+
: (Optional, string) 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:
200+
201+
`all`
202+
: Match any data stream or index, including [hidden](/reference/elasticsearch/rest-apis/api-conventions.md#multi-hidden) ones.
203+
204+
`open`
205+
: Match open, non-hidden indices. Also matches any non-hidden data stream.
206+
207+
`closed`
208+
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
209+
210+
`hidden`
211+
: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both.
212+
213+
`none`
214+
: Wildcard patterns are not accepted.
215+
216+
Defaults to `open`.
217+
218+
219+
`ignore_unavailable`
220+
: (Optional, Boolean) If `false`, the request returns an error if it targets a missing or closed index. Defaults to `false`.
221+
222+
`master_timeout`
223+
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
224+
225+
`timeout`
226+
: (Optional, [time units](/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. Defaults to `30s`. Can also be set to `-1` to indicate that the request should never timeout.
227+
228+
229+
### {{api-examples-title}} [remove-index-block-api-example]
230+
231+
The following example shows how to remove an index block:
232+
233+
```console
234+
DELETE /my-index-000001/_block/write
235+
```
236+
237+
The API returns following response:
238+
239+
```console-result
240+
{
241+
"acknowledged" : true,
242+
"indices" : [ {
243+
"name" : "my-index-000001",
244+
"unblocked" : true
245+
} ]
246+
}
247+
```
248+

libs/entitlement/src/test/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTreeTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public void testWindowsAbsolutPathAccess() {
461461
)
462462
),
463463
TEST_PATH_LOOKUP,
464-
null,
464+
List.of(),
465465
List.of()
466466
);
467467

@@ -487,7 +487,7 @@ public void testWindowsMixedCaseAccess() {
487487
)
488488
),
489489
TEST_PATH_LOOKUP,
490-
null,
490+
List.of(),
491491
List.of()
492492
);
493493

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"indices.remove_block": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html",
5+
"description": "Removes a block from an index."
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/{index}/_block/{block}",
18+
"methods": [
19+
"DELETE"
20+
],
21+
"parts": {
22+
"index": {
23+
"type": "list",
24+
"description": "A comma separated list of indices to remove a block from"
25+
},
26+
"block": {
27+
"type": "string",
28+
"description": "The block to remove (one of read, write, read_only or metadata)"
29+
}
30+
}
31+
}
32+
]
33+
},
34+
"params": {
35+
"timeout": {
36+
"type": "time",
37+
"description": "Explicit operation timeout"
38+
},
39+
"master_timeout": {
40+
"type": "time",
41+
"description": "Specify timeout for connection to master"
42+
},
43+
"ignore_unavailable": {
44+
"type": "boolean",
45+
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
46+
},
47+
"allow_no_indices": {
48+
"type": "boolean",
49+
"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)"
50+
},
51+
"expand_wildcards": {
52+
"type": "enum",
53+
"options": [
54+
"open",
55+
"closed",
56+
"hidden",
57+
"none",
58+
"all"
59+
],
60+
"default": "open",
61+
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
62+
}
63+
}
64+
}
65+
}

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.blocks/10_basic.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,46 @@
2828
index: test_index
2929
body:
3030
index.blocks.write: false
31+
32+
---
33+
"Test removing block via remove_block API":
34+
- requires:
35+
test_runner_features: [capabilities]
36+
reason: "index block APIs have only been made available in 9.1.0"
37+
capabilities:
38+
- method: DELETE
39+
path: /{index}/_block/{block}
40+
- do:
41+
indices.create:
42+
index: test_index_2
43+
44+
- do:
45+
indices.add_block:
46+
index: test_index_2
47+
block: write
48+
- is_true: acknowledged
49+
50+
- do:
51+
catch: /cluster_block_exception/
52+
index:
53+
index: test_index_2
54+
body: { foo: bar }
55+
56+
- do:
57+
search:
58+
index: test_index_2
59+
60+
- do:
61+
indices.remove_block:
62+
index: test_index_2
63+
block: write
64+
- is_true: acknowledged
65+
66+
- do:
67+
index:
68+
index: test_index_2
69+
body: { foo: bar }
70+
71+
- do:
72+
search:
73+
index: test_index_2

0 commit comments

Comments
 (0)