Skip to content

Commit c541cdf

Browse files
committed
Merge branch 'upstream/master' into rollup-index-improvement
* upstream/master: (166 commits) Bind host all instead of just _site_ when needed (elastic#83145) [DOCS] Fix min/max agg snippets for histograms (elastic#83695) [DOCS] Add deprecation notice for system indices (elastic#83688) Cache ILM policy name on IndexMetadata (elastic#83603) [DOCS] Fix 8.0 breaking changes sort order (elastic#83685) [ML] fix random sampling background query consistency (elastic#83676) Move internal APIs into their own namespace '_internal' Runtime fields core-with-mapped tests support tsdb (elastic#83577) Optimize calculating the presence of a quorum (elastic#83638) Use switch expressions in EnableAllocationDecider and NodeShutdownAllocationDecider (elastic#83641) Note libffi error message in tmpdir docs (elastic#83662) Fix TransportDesiredNodesActionsIT batch tests (elastic#83659) [DOCS] Remove unused upgrade doc files (elastic#83617) [ML] Wait for model process to stop in stop deployment (elastic#83644) [ML] Fix submit after shutdown in process worker service (elastic#83645) Remove req/resp classes associated with HLRC (elastic#83599) Introduce index.version.compatibility setting (elastic#83264) Rename InternalTestCluster#getMasterNodeInstance (elastic#83407) Mute TimeSeriesIndexSearcherTests testCollectInOrderAcrossSegments (elastic#83648) Add rollover add max_primary_shard_docs condition (elastic#80981) ... # Conflicts: # x-pack/plugin/rollup/build.gradle # x-pack/plugin/rollup/src/test/java/org/elasticsearch/xpack/rollup/v2/RollupActionSingleNodeTests.java
2 parents b996c80 + 0a93df1 commit c541cdf

File tree

1,746 files changed

+23339
-86763
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,746 files changed

+23339
-86763
lines changed

.backportrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"upstream": "elastic/elasticsearch",
33
"targetBranchChoices": [
44
"master",
5+
"8.1",
56
"8.0",
67
"7.17",
7-
"7.16",
88
"6.8"
99
],
1010
"targetPRLabels": ["backport"],
1111
"branchLabelMapping": {
12-
"^v8.1.0$": "master",
12+
"^v8.2.0$": "master",
1313
"^v(\\d+).(\\d+).\\d+(?:-(?:alpha|beta|rc)\\d+)?$": "$1.$2"
1414
}
1515
}

.ci/bwcVersions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ BWC_VERSION:
4848
- "7.16.1"
4949
- "7.16.2"
5050
- "7.16.3"
51-
- "7.16.4"
5251
- "7.17.0"
52+
- "7.17.1"
5353
- "8.0.0"
5454
- "8.1.0"
55+
- "8.2.0"

.ci/jobs.t/elastic+elasticsearch+multijob+packaging-tests-unix.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
name: os
1515
values:
1616
- centos-7-packaging
17-
- centos-8-packaging
1817
- debian-10-packaging
1918
- debian-11-packaging
2019
- opensuse-15-1-packaging

.ci/jobs.t/elastic+elasticsearch+multijob+packaging-tests-upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
type: label-expression
1414
name: os
1515
values:
16-
- centos-8-packaging
16+
- rocky-linux-8-packaging
1717
- ubuntu-20.04-packaging
1818
- axis:
1919
type: yaml

.ci/jobs.t/elastic+elasticsearch+multijob+packaging-tests-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- "windows-2012-r2"
1717
- "windows-2016"
1818
- "windows-2019"
19+
- "windows-2022"
1920
builders:
2021
- inject:
2122
properties-file: '.ci/java-versions.properties'

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-arm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
type: label-expression
1515
name: os
1616
values:
17-
- "centos-8-aarch64&&immutable"
1817
- "ubuntu-1804-aarch64&&immutable"
1918
builders:
2019
- inject:

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-unix.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
name: os
1515
values:
1616
- "centos-7&&immutable"
17-
- "centos-8&&immutable"
1817
- "amazon&&immutable"
1918
- "debian-10&&immutable"
2019
- "debian-11&&immutable"

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- "windows-2012-r2"
1919
- "windows-2016"
2020
- "windows-2019"
21+
- "windows-2022"
2122
# We shred out Windows testing into 4 parallel builds like on intake for expediency.
2223
# Our tests run much slower on Windows so this avoids issues with builds timing out.
2324
- axis:

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-unix-sample.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
type: label-expression
3232
name: os
3333
values:
34-
- centos-8-packaging
34+
- rocky-linux-8-packaging
3535
- ubuntu-20.04-packaging
3636
- axis:
3737
type: user-defined

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-unix.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
name: os
3434
values:
3535
- centos-7-packaging
36-
- centos-8-packaging
3736
- debian-9-packaging
3837
- debian-10-packaging
3938
- debian-11-packaging

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-windows-nojdk.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
cancel-builds-on-update: true
2424
# We've removed the no-jdk distribution on master as well
2525
white-list-target-branches:
26+
- 7.17
2627
- 7.16
27-
- 7.15
2828
excluded-regions:
2929
- ^docs/.*
3030
white-list-labels:
@@ -39,6 +39,7 @@
3939
- "windows-2012-r2"
4040
- "windows-2016"
4141
- "windows-2019"
42+
- "windows-2022"
4243
- axis:
4344
type: user-defined
4445
name: PACKAGING_TASK

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-windows-sample-nojdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
cancel-builds-on-update: true
2424
# We've removed the no-jdk distribution on master as well
2525
white-list-target-branches:
26+
- 7.17
2627
- 7.16
27-
- 7.15
2828
excluded-regions:
2929
- ^docs/.*
3030
black-list-labels:

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-windows-sample.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
status-context: elasticsearch-ci/packaging-tests-windows-sample
2323
cancel-builds-on-update: true
2424
black-list-target-branches:
25+
- 7.17
2526
- 7.16
26-
- 7.15
27-
- 6.8
2827
excluded-regions:
2928
- ^docs/.*
3029
black-list-labels:

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-tests-windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
status-context: elasticsearch-ci/packaging-tests-windows
2323
cancel-builds-on-update: true
2424
black-list-target-branches:
25+
- 7.17
2526
- 7.16
26-
- 7.15
2727
- 6.8
2828
excluded-regions:
2929
- ^docs/.*
@@ -39,6 +39,7 @@
3939
- "windows-2012-r2"
4040
- "windows-2016"
4141
- "windows-2019"
42+
- "windows-2022"
4243
- axis:
4344
type: user-defined
4445
name: PACKAGING_TASK

.ci/jobs.t/elastic+elasticsearch+pull-request+packaging-upgrade-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
type: label-expression
3434
name: os
3535
values:
36-
- centos-8-packaging
36+
- rocky-linux-8-packaging
3737
- ubuntu-20.04-packaging
3838
- axis:
3939
type: yaml

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/AllocationBenchmark.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ public ClusterState measureAllocation() {
156156
while (clusterState.getRoutingNodes().hasUnassignedShards()) {
157157
clusterState = strategy.applyStartedShards(
158158
clusterState,
159-
StreamSupport.stream(clusterState.getRoutingNodes().spliterator(), false)
159+
clusterState.getRoutingNodes()
160+
.stream()
160161
.flatMap(shardRoutings -> StreamSupport.stream(shardRoutings.spliterator(), false))
161162
.filter(ShardRouting::initializing)
162163
.collect(Collectors.toList())

benchmarks/src/main/java/org/elasticsearch/benchmark/search/aggregations/TermsReduceBenchmark.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.elasticsearch.search.aggregations.InternalAggregations;
3030
import org.elasticsearch.search.aggregations.MultiBucketConsumerService;
3131
import org.elasticsearch.search.aggregations.bucket.terms.StringTerms;
32+
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
3233
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
3334
import org.elasticsearch.search.builder.SearchSourceBuilder;
3435
import org.elasticsearch.search.query.QuerySearchResult;
@@ -65,10 +66,12 @@
6566
@Fork(value = 1)
6667
public class TermsReduceBenchmark {
6768

69+
private final TermsAggregationBuilder builder = new TermsAggregationBuilder("terms");
70+
6871
private final SearchPhaseController controller = new SearchPhaseController((task, req) -> new AggregationReduceContext.Builder() {
6972
@Override
7073
public AggregationReduceContext forPartialReduction() {
71-
return new AggregationReduceContext.ForPartial(null, null, task);
74+
return new AggregationReduceContext.ForPartial(null, null, task, builder);
7275
}
7376

7477
@Override
@@ -77,7 +80,7 @@ public AggregationReduceContext forFinalReduction() {
7780
Integer.MAX_VALUE,
7881
new NoneCircuitBreakerService().getBreaker(CircuitBreaker.REQUEST)
7982
);
80-
return new AggregationReduceContext.ForFinal(null, null, bucketConsumer, PipelineAggregator.PipelineTree.EMPTY, task);
83+
return new AggregationReduceContext.ForFinal(null, null, task, builder, bucketConsumer, PipelineAggregator.PipelineTree.EMPTY);
8184
}
8285
});
8386

build-conventions/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ dependencies {
6565
api 'org.apache.maven:maven-model:3.6.2'
6666
api 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
6767
api 'org.apache.rat:apache-rat:0.11'
68-
compileOnly "com.puppycrawl.tools:checkstyle:8.45.1"
68+
compileOnly "com.puppycrawl.tools:checkstyle:9.3"
6969
api('com.diffplug.spotless:spotless-plugin-gradle:6.0.0') {
7070
exclude module: "groovy-xml"
7171
}

build-conventions/src/main/java/org/elasticsearch/gradle/internal/checkstyle/HiddenFieldCheck.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
* @notice
33
* checkstyle: Checks Java source code for adherence to a set of rules.
44
* Copyright (C) 2001-2021 the original author or authors.
5-
5+
*
66
* This library is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU Lesser General Public
88
* License as published by the Free Software Foundation; either
99
* version 2.1 of the License, or (at your option) any later version.
10-
10+
*
1111
* This library is distributed in the hope that it will be useful,
1212
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
15-
15+
*
1616
* You should have received a copy of the GNU Lesser General Public
1717
* License along with this library; if not, write to the Free Software
1818
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

build-conventions/src/main/java/org/elasticsearch/gradle/internal/checkstyle/MissingJavadocTypeCheck.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public int[] getRequiredTokens() {
121121
return CommonUtil.EMPTY_INT_ARRAY;
122122
}
123123

124+
// suppress deprecation until https://github.com/checkstyle/checkstyle/issues/11166
125+
@SuppressWarnings("deprecation")
124126
@Override
125127
public void visitToken(DetailAST ast) {
126128
if (shouldCheck(ast)) {
@@ -140,24 +142,18 @@ public void visitToken(DetailAST ast) {
140142
* @return whether we should check a given node.
141143
*/
142144
private boolean shouldCheck(final DetailAST ast) {
143-
final Scope customScope;
144-
145-
if (ScopeUtil.isInInterfaceOrAnnotationBlock(ast)) {
146-
customScope = Scope.PUBLIC;
147-
} else {
148-
final DetailAST mods = ast.findFirstToken(TokenTypes.MODIFIERS);
149-
customScope = ScopeUtil.getScopeFromMods(mods);
150-
}
145+
final Scope customScope = ScopeUtil.getScope(ast);
151146
final Scope surroundingScope = ScopeUtil.getSurroundingScope(ast);
152147

153148
final String outerTypeName = ast.findFirstToken(TokenTypes.IDENT).getText();
154149

155150
return customScope.isIn(scope)
156151
&& (surroundingScope == null || surroundingScope.isIn(scope))
157152
&& (excludeScope == null
158-
|| customScope.isIn(excludeScope) == false
159-
|| surroundingScope != null && surroundingScope.isIn(excludeScope) == false)
160-
&& AnnotationUtil.containsAnnotation(ast, skipAnnotations) == false
153+
|| !customScope.isIn(excludeScope)
154+
|| surroundingScope != null
155+
&& !surroundingScope.isIn(excludeScope))
156+
&& !AnnotationUtil.containsAnnotation(ast, skipAnnotations)
161157
&& ignorePattern.matcher(outerTypeName).find() == false;
162158
}
163159

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/YamlRestCompatTestPluginFuncTest.groovy

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
3030

3131
def "yamlRestTestVxCompatTest does nothing when there are no tests"() {
3232
given:
33-
addSubProject(":distribution:bwc:staged") << """
33+
addSubProject(":distribution:bwc:bugfix") << """
3434
configurations { checkout }
3535
artifacts {
3636
checkout(new File(projectDir, "checkoutDir"))
@@ -53,11 +53,11 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
5353
result.task(transformTask).outcome == TaskOutcome.NO_SOURCE
5454
}
5555

56-
def "yamlRestTestVxCompatTest executes and copies api and transforms tests from :bwc:staged"() {
56+
def "yamlRestTestVxCompatTest executes and copies api and transforms tests from :bwc:bugfix"() {
5757
given:
5858
internalBuild()
5959

60-
addSubProject(":distribution:bwc:staged") << """
60+
addSubProject(":distribution:bwc:bugfix") << """
6161
configurations { checkout }
6262
artifacts {
6363
checkout(new File(projectDir, "checkoutDir"))
@@ -90,8 +90,8 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
9090
String api = "foo.json"
9191
String test = "10_basic.yml"
9292
//add the compatible test and api files, these are the prior version's normal yaml rest tests
93-
file("distribution/bwc/staged/checkoutDir/rest-api-spec/src/main/resources/rest-api-spec/api/" + api) << ""
94-
file("distribution/bwc/staged/checkoutDir/src/yamlRestTest/resources/rest-api-spec/test/" + test) << ""
93+
file("distribution/bwc/bugfix/checkoutDir/rest-api-spec/src/main/resources/rest-api-spec/api/" + api) << ""
94+
file("distribution/bwc/bugfix/checkoutDir/src/yamlRestTest/resources/rest-api-spec/test/" + test) << ""
9595

9696
when:
9797
def result = gradleRunner("yamlRestTestV${compatibleVersion}CompatTest").build()
@@ -136,7 +136,7 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
136136
def "yamlRestTestVxCompatTest is wired into check and checkRestCompat"() {
137137
given:
138138

139-
addSubProject(":distribution:bwc:staged") << """
139+
addSubProject(":distribution:bwc:bugfix") << """
140140
configurations { checkout }
141141
artifacts {
142142
checkout(new File(projectDir, "checkoutDir"))
@@ -180,7 +180,7 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
180180
given:
181181
internalBuild()
182182

183-
addSubProject(":distribution:bwc:staged") << """
183+
addSubProject(":distribution:bwc:bugfix") << """
184184
configurations { checkout }
185185
artifacts {
186186
checkout(new File(projectDir, "checkoutDir"))
@@ -224,7 +224,7 @@ class YamlRestCompatTestPluginFuncTest extends AbstractRestResourcesFuncTest {
224224

225225
setupRestResources([], [])
226226

227-
file("distribution/bwc/staged/checkoutDir/src/yamlRestTest/resources/rest-api-spec/test/test.yml" ) << """
227+
file("distribution/bwc/bugfix/checkoutDir/src/yamlRestTest/resources/rest-api-spec/test/test.yml" ) << """
228228
"one":
229229
- do:
230230
do_.some.key_to_replace:

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ValidateJsonAgainstSchemaTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import java.util.stream.StreamSupport;
4343

4444
/**
45-
* Incremental task to validate a set of JSON files against against a schema.
45+
* Incremental task to validate a set of JSON files against a schema.
4646
*/
4747
public class ValidateJsonAgainstSchemaTask extends DefaultTask {
4848
private File jsonSchema;

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ValidateYamlAgainstSchemaTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
1313

1414
/**
15-
* Incremental task to validate a set of YAML files against against a schema.
15+
* Incremental task to validate a set of YAML files against a schema.
1616
*/
1717
public class ValidateYamlAgainstSchemaTask extends ValidateJsonAgainstSchemaTask {
1818
@Override

0 commit comments

Comments
 (0)