Skip to content

Commit 020ae6e

Browse files
committed
Merge branch 'main' into lru
2 parents f472530 + a2d369d commit 020ae6e

File tree

1,667 files changed

+29683
-10201
lines changed

Some content is hidden

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

1,667 files changed

+29683
-10201
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ steps:
4848
timeout_in_minutes: 300
4949
matrix:
5050
setup:
51-
BWC_VERSION: ["7.17.20", "8.13.2", "8.14.0"]
51+
BWC_VERSION: ["7.17.21", "8.13.3", "8.14.0"]
5252
agents:
5353
provider: gcp
5454
image: family/elasticsearch-ubuntu-2004

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ steps:
305305
env:
306306
BWC_VERSION: 7.16.3
307307

308-
- label: "{{matrix.image}} / 7.17.20 / packaging-tests-upgrade"
309-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v7.17.20
308+
- label: "{{matrix.image}} / 7.17.21 / packaging-tests-upgrade"
309+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v7.17.21
310310
timeout_in_minutes: 300
311311
matrix:
312312
setup:
@@ -319,7 +319,7 @@ steps:
319319
machineType: custom-16-32768
320320
buildDirectory: /dev/shm/bk
321321
env:
322-
BWC_VERSION: 7.17.20
322+
BWC_VERSION: 7.17.21
323323

324324
- label: "{{matrix.image}} / 8.0.1 / packaging-tests-upgrade"
325325
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.0.1
@@ -529,8 +529,8 @@ steps:
529529
env:
530530
BWC_VERSION: 8.12.2
531531

532-
- label: "{{matrix.image}} / 8.13.2 / packaging-tests-upgrade"
533-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.13.2
532+
- label: "{{matrix.image}} / 8.13.3 / packaging-tests-upgrade"
533+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.13.3
534534
timeout_in_minutes: 300
535535
matrix:
536536
setup:
@@ -543,7 +543,7 @@ steps:
543543
machineType: custom-16-32768
544544
buildDirectory: /dev/shm/bk
545545
env:
546-
BWC_VERSION: 8.13.2
546+
BWC_VERSION: 8.13.3
547547

548548
- label: "{{matrix.image}} / 8.14.0 / packaging-tests-upgrade"
549549
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.14.0

.buildkite/pipelines/periodic.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ steps:
172172
buildDirectory: /dev/shm/bk
173173
env:
174174
BWC_VERSION: 7.16.3
175-
- label: 7.17.20 / bwc
176-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v7.17.20#bwcTest
175+
- label: 7.17.21 / bwc
176+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v7.17.21#bwcTest
177177
timeout_in_minutes: 300
178178
agents:
179179
provider: gcp
180180
image: family/elasticsearch-ubuntu-2004
181181
machineType: n1-standard-32
182182
buildDirectory: /dev/shm/bk
183183
env:
184-
BWC_VERSION: 7.17.20
184+
BWC_VERSION: 7.17.21
185185
- label: 8.0.1 / bwc
186186
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.0.1#bwcTest
187187
timeout_in_minutes: 300
@@ -312,16 +312,16 @@ steps:
312312
buildDirectory: /dev/shm/bk
313313
env:
314314
BWC_VERSION: 8.12.2
315-
- label: 8.13.2 / bwc
316-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.2#bwcTest
315+
- label: 8.13.3 / bwc
316+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.13.3#bwcTest
317317
timeout_in_minutes: 300
318318
agents:
319319
provider: gcp
320320
image: family/elasticsearch-ubuntu-2004
321321
machineType: n1-standard-32
322322
buildDirectory: /dev/shm/bk
323323
env:
324-
BWC_VERSION: 8.13.2
324+
BWC_VERSION: 8.13.3
325325
- label: 8.14.0 / bwc
326326
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.14.0#bwcTest
327327
timeout_in_minutes: 300
@@ -396,7 +396,7 @@ steps:
396396
setup:
397397
ES_RUNTIME_JAVA:
398398
- openjdk17
399-
BWC_VERSION: ["7.17.20", "8.13.2", "8.14.0"]
399+
BWC_VERSION: ["7.17.21", "8.13.3", "8.14.0"]
400400
agents:
401401
provider: gcp
402402
image: family/elasticsearch-ubuntu-2004
@@ -438,7 +438,7 @@ steps:
438438
- graalvm-ce17
439439
- openjdk17
440440
- openjdk21
441-
BWC_VERSION: ["7.17.20", "8.13.2", "8.14.0"]
441+
BWC_VERSION: ["7.17.21", "8.13.3", "8.14.0"]
442442
agents:
443443
provider: gcp
444444
image: family/elasticsearch-ubuntu-2004

.ci/bwcVersions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BWC_VERSION:
1616
- "7.14.2"
1717
- "7.15.2"
1818
- "7.16.3"
19-
- "7.17.20"
19+
- "7.17.21"
2020
- "8.0.1"
2121
- "8.1.3"
2222
- "8.2.3"
@@ -30,5 +30,5 @@ BWC_VERSION:
3030
- "8.10.4"
3131
- "8.11.4"
3232
- "8.12.2"
33-
- "8.13.2"
33+
- "8.13.3"
3434
- "8.14.0"

.ci/snapshotBwcVersions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
BWC_VERSION:
2-
- "7.17.20"
3-
- "8.13.2"
2+
- "7.17.21"
3+
- "8.13.3"
44
- "8.14.0"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ testfixtures_shared/
6868

6969
# Generated
7070
checkstyle_ide.xml
71-
x-pack/plugin/esql/gen/
71+
x-pack/plugin/esql/src/main/generated-src/generated/
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
package org.elasticsearch.gradle.internal.doc
10+
11+
import org.elasticsearch.gradle.fixtures.AbstractGradleInternalPluginFuncTest
12+
import org.elasticsearch.gradle.internal.conventions.precommit.PrecommitPlugin
13+
import org.gradle.testkit.runner.TaskOutcome
14+
15+
class DocsTestPluginFuncTest extends AbstractGradleInternalPluginFuncTest {
16+
Class<? extends PrecommitPlugin> pluginClassUnderTest = DocsTestPlugin.class
17+
18+
def setup() {
19+
File docDir = new File(projectDir, 'doc');
20+
docDir.mkdirs()
21+
addSampleDoc(docDir)
22+
buildApiRestrictionsDisabled = true
23+
configurationCacheCompatible = false;
24+
buildFile << """
25+
tasks.named('listSnippets') {
26+
docs = fileTree('doc')
27+
}
28+
29+
tasks.named('listConsoleCandidates') {
30+
docs = fileTree('doc')
31+
}
32+
"""
33+
}
34+
35+
def "can list snippets"() {
36+
when:
37+
def result = gradleRunner("listSnippets").build()
38+
then:
39+
result.task(":listSnippets").outcome == TaskOutcome.SUCCESS
40+
assertOutputContains(result.output, """
41+
> Task :listSnippets
42+
mapper-annotated-text.asciidoc[37:39](Painless)
43+
mapper-annotated-text.asciidoc[42:44](js)
44+
mapper-annotated-text.asciidoc[51:69](console)// TEST[setup:seats]
45+
""")
46+
}
47+
48+
def "can console candidates"() {
49+
when:
50+
def result = gradleRunner("listConsoleCandidates").build()
51+
then:
52+
result.task(":listConsoleCandidates").outcome == TaskOutcome.SUCCESS
53+
assertOutputContains(result.output, """
54+
> Task :listConsoleCandidates
55+
mapper-annotated-text.asciidoc[42:44](js)
56+
""")
57+
}
58+
59+
void addSampleDoc(File docFolder) {
60+
new File(docFolder, "mapper-annotated-text.asciidoc").text = """
61+
[[painless-filter-context]]
62+
=== Filter context
63+
64+
Use a Painless script as a {ref}/query-dsl-script-query.html[filter] in a
65+
query to include and exclude documents.
66+
67+
68+
*Variables*
69+
70+
`params` (`Map`, read-only)::
71+
User-defined parameters passed in as part of the query.
72+
73+
`doc` (`Map`, read-only)::
74+
Contains the fields of the current document where each field is a
75+
`List` of values.
76+
77+
*Return*
78+
79+
`boolean`::
80+
Return `true` if the current document should be returned as a result of
81+
the query, and `false` otherwise.
82+
83+
84+
*API*
85+
86+
The standard <<painless-api-reference-shared, Painless API>> is available.
87+
88+
*Example*
89+
90+
To run this example, first follow the steps in
91+
<<painless-context-examples, context examples>>.
92+
93+
This script finds all unsold documents that cost less than \$25.
94+
95+
[source,Painless]
96+
----
97+
doc['sold'].value == false && doc['cost'].value < 25
98+
----
99+
100+
[source,js]
101+
----
102+
curl 'hello world'
103+
----
104+
105+
Defining `cost` as a script parameter enables the cost to be configured
106+
in the script query request. For example, the following request finds
107+
all available theatre seats for evening performances that are under \$25.
108+
109+
[source,console]
110+
----
111+
GET seats/_search
112+
{
113+
"query": {
114+
"bool": {
115+
"filter": {
116+
"script": {
117+
"script": {
118+
"source": "doc['sold'].value == false && doc['cost'].value < params.cost",
119+
"params": {
120+
"cost": 25
121+
}
122+
}
123+
}
124+
}
125+
}
126+
}
127+
}
128+
----
129+
// TEST[setup:seats]
130+
"""
131+
}
132+
}

build-tools-internal/src/main/groovy/org/elasticsearch/gradle/internal/doc/DocsTestPlugin.groovy

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)