Skip to content

Commit 8635ddc

Browse files
committed
Merge remote-tracking branch 'upstream/main' into remove_xpack_rolling_restart_checks
2 parents 577531b + 8ef5581 commit 8635ddc

File tree

498 files changed

+8571
-3351
lines changed

Some content is hidden

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

498 files changed

+8571
-3351
lines changed

.ci/bwcVersions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,6 @@ BWC_VERSION:
8484
- "8.6.0"
8585
- "8.6.1"
8686
- "8.6.2"
87+
- "8.6.3"
8788
- "8.7.0"
8889
- "8.8.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BWC_VERSION:
22
- "7.17.10"
3-
- "8.6.2"
3+
- "8.6.3"
44
- "8.7.0"
55
- "8.8.0"

TESTING.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ When running Elasticsearch with `./gradlew run`, assertions are enabled by
7070
default. To disable them, add the following command line option:
7171

7272
-------------------------
73-
-Dtests.jvm.argline="-da"
73+
-Dtests.jvm.argline="-da -dsa"
7474
-------------------------
7575

7676
==== Distribution

benchmarks/src/main/java/org/elasticsearch/benchmark/script/ScriptScoreBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class ScriptScoreBenchmark {
8282
private final ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, pluginsService.filterPlugins(ScriptPlugin.class));
8383

8484
private final Map<String, MappedFieldType> fieldTypes = Map.ofEntries(
85-
Map.entry("n", new NumberFieldType("n", NumberType.LONG, false, false, true, true, null, Map.of(), null, false, null))
85+
Map.entry("n", new NumberFieldType("n", NumberType.LONG, false, false, true, true, null, Map.of(), null, false, null, null))
8686
);
8787
private final IndexFieldDataCache fieldDataCache = new IndexFieldDataCache.None();
8888
private final Map<String, Set<String>> sourcePaths = Map.of("n", Set.of("n"));

build-tools-internal/src/main/groovy/elasticsearch.build-scan.gradle

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ import org.elasticsearch.gradle.Architecture
1010
import org.elasticsearch.gradle.OS
1111
import org.elasticsearch.gradle.internal.info.BuildParams
1212
import org.gradle.initialization.BuildRequestMetaData
13-
import org.elasticsearch.gradle.internal.test.rerun.TestRerunPlugin
14-
import java.util.concurrent.TimeUnit
15-
16-
long startTime = project.gradle.services.get(BuildRequestMetaData).getStartTime()
1713

1814
buildScan {
1915
URL jenkinsUrl = System.getenv('JENKINS_URL') ? new URL(System.getenv('JENKINS_URL')) : null
16+
String buildKiteUrl = System.getenv('BUILDKITE_BUILD_URL') ? System.getenv('BUILDKITE_BUILD_URL') : null
2017

2118
// Automatically publish scans from Elasticsearch CI
2219
if (jenkinsUrl?.host?.endsWith('elastic.co') || jenkinsUrl?.host?.endsWith('elastic.dev')) {
@@ -25,12 +22,6 @@ buildScan {
2522
}
2623

2724
background {
28-
String buildNumber = System.getenv('BUILD_NUMBER')
29-
String buildUrl = System.getenv('BUILD_URL')
30-
String jobName = System.getenv('JOB_NAME')
31-
String nodeName = System.getenv('NODE_NAME')
32-
String jobBranch = System.getenv('ghprbTargetBranch') ?: System.getenv('JOB_BRANCH')
33-
3425
tag OS.current().name()
3526
tag Architecture.current().name()
3627

@@ -39,23 +30,25 @@ buildScan {
3930
tag 'FIPS'
4031
}
4132

42-
// Link to Jenkins worker logs and system metrics
43-
if (nodeName) {
44-
link 'System logs', "https://ci-stats.elastic.co/app/infra#/logs?" +
45-
"&logFilter=(expression:'host.name:${nodeName}',kind:kuery)"
46-
buildFinished {
47-
link 'System metrics', "https://ci-stats.elastic.co/app/metrics/detail/host/" +
48-
"${nodeName}?_g=()&metricTime=(autoReload:!f,refreshInterval:5000," +
49-
"time:(from:${startTime - TimeUnit.MILLISECONDS.convert(5, TimeUnit.MINUTES)},interval:%3E%3D1m," +
50-
"to:${System.currentTimeMillis() + TimeUnit.MILLISECONDS.convert(5, TimeUnit.MINUTES)}))"
51-
}
52-
}
53-
5433
// Jenkins-specific build scan metadata
5534
if (jenkinsUrl) {
5635
// Disable async upload in CI to ensure scan upload completes before CI agent is terminated
5736
uploadInBackground = false
5837

38+
String buildNumber = System.getenv('BUILD_NUMBER')
39+
String buildUrl = System.getenv('BUILD_URL')
40+
String jobName = System.getenv('JOB_NAME')
41+
String nodeName = System.getenv('NODE_NAME')
42+
String jobBranch = System.getenv('ghprbTargetBranch') ?: System.getenv('JOB_BRANCH')
43+
44+
// Link to Jenkins worker logs and system metrics
45+
if (nodeName) {
46+
link 'System logs', "https://ci-stats.elastic.co/app/infra#/logs?&logFilter=(expression:'host.name:${nodeName}',kind:kuery)"
47+
buildFinished {
48+
link 'System metrics', "https://ci-stats.elastic.co/app/metrics/detail/host/${nodeName}"
49+
}
50+
}
51+
5952
// Parse job name in the case of matrix builds
6053
// Matrix job names come in the form of "base-job-name/matrix_param1=value1,matrix_param2=value2"
6154
def splitJobName = jobName.split('/')
@@ -98,26 +91,45 @@ buildScan {
9891
value 'Git Commit ID', BuildParams.gitRevision
9992
link 'Source', "https://github.com/elastic/elasticsearch/tree/${BuildParams.gitRevision}"
10093
}
94+
} else if (buildKiteUrl) { //Buildkite-specific build scan metadata
95+
// Disable async upload in CI to ensure scan upload completes before CI agent is terminated
96+
uploadInBackground = false
97+
98+
def branch = System.getenv('BUILDKITE_BRANCH')
99+
def repoMatcher = System.getenv('BUILDKITE_REPO') =~ /(https:\/\/github\.com\/|git@github\.com:)(\S+)\.git/
100+
def repository = repoMatcher.matches() ? repoMatcher.group(2) : "<unknown>"
101+
tag 'CI'
102+
link 'CI Build', buildKiteUrl
103+
value 'Job Number', System.getenv('BUILDKITE_BUILD_NUMBER')
104+
105+
106+
// Add SCM information
107+
def prId = System.getenv('BUILDKITE_PULL_REQUEST')
108+
if (prId) {
109+
def prBaseUrl = (System.getenv('BUILDKITE_PULL_REQUEST_REPO') - ".git")
110+
value 'Git Commit ID', System.getenv('BUILDKITE_COMMIT')
111+
tag "pr/${prId}"
112+
tag 'pull-request'
113+
link 'Source', "${prBaseUrl}/tree/${System.getenv('BUILDKITE_COMMIT')}"
114+
link 'Pull Request', "https://github.com/${repository}/pull/${prId}"
115+
} else {
116+
value 'Git Commit ID', BuildParams.gitRevision
117+
link 'Source', "https://github.com/${repository}/tree/${BuildParams.gitRevision}"
118+
tag branch
119+
}
120+
121+
buildScanPublished { scan ->
122+
// Attach build scan link as build metadata
123+
// See: https://buildkite.com/docs/pipelines/build-meta-data
124+
['buildkite-agent', 'meta-data', 'set', "build-scan-${System.getenv('BUILDKITE_JOB_ID')}", "${scan.buildScanUri}"].execute()
125+
126+
// Add a build annotation
127+
// See: https://buildkite.com/docs/agent/v3/cli-annotate
128+
def body = """<div class="mb3"><span class="p1 border rounded">${System.getenv('BUILDKITE_LABEL')}</span> :gradle: build ran: <a href="${scan.buildScanUri}"><code>gradle ${gradle.startParameter.taskNames.join(' ')}</code></a></div>"""
129+
['buildkite-agent', 'annotate', '--context', 'gradle-build-scans', '--append', '--style', 'info', body].execute()
130+
}
101131
} else {
102132
tag 'LOCAL'
103133
}
104134
}
105135
}
106-
107-
subprojects {
108-
project.getPlugins().withType(TestRerunPlugin) {
109-
tasks.withType(Test).configureEach(new Action<Test>() {
110-
@Override
111-
void execute(Test test) {
112-
test.doLast(new Action<Test>() {
113-
@Override
114-
void execute(Test t) {
115-
if(t.rerun.didRerun.get() == true) {
116-
buildScan.tag 'unexpected-test-jvm-exit'
117-
}
118-
}
119-
})
120-
}
121-
})
122-
}
123-
}

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/GlobalBuildInfoPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void apply(Project project) {
112112
params.setGitOrigin(gitInfo.getOrigin());
113113
params.setBuildDate(ZonedDateTime.now(ZoneOffset.UTC));
114114
params.setTestSeed(getTestSeed());
115-
params.setIsCi(System.getenv("JENKINS_URL") != null);
115+
params.setIsCi(System.getenv("JENKINS_URL") != null || System.getenv("BUILDKITE_BUILD_URL") != null);
116116
params.setDefaultParallel(ParallelDetector.findDefaultParallel(project));
117117
params.setInFipsJvm(Util.getBooleanProperty("tests.fips.enabled", false));
118118
params.setIsSnapshotBuild(Util.getBooleanProperty("build.snapshot", true));

build-tools/src/main/resources/plugin-descriptor.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Elasticsearch plugin descriptor file
2-
# This file must exist as 'plugin-descriptor.properties' inside a plugin.
2+
# This file must exist as 'plugin-descriptor.properties' or 'stable-plugin-descriptor.properties inside a plugin.
33
#
44
### example plugin for "foo"
55
#
@@ -31,7 +31,9 @@ name=${name}
3131
# separated by "."'s and may have leading zeros
3232
java.version=${javaVersion}
3333
#
34-
# 'elasticsearch.version': version of elasticsearch compiled against
34+
# 'elasticsearch.version': version of elasticsearch compiled against.
35+
# Plugins implementing plugin-api.jar this version only has to match a major version of the ES server
36+
# For all other plugins it has to be the same as ES server version
3537
elasticsearch.version=${elasticsearchVersion}
3638
### optional elements for plugins:
3739
<% if (classname) { %>

docs/changelog/92810.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 92810
2+
summary: Do not fail node if SAML HTTP metadata is unavailable
3+
area: Authentication
4+
type: enhancement
5+
issues:
6+
- 37608

docs/changelog/93177.yaml

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

docs/changelog/93239.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pr: 93239
2+
summary: Support ignore malformed in boolean fields
3+
area: Search
4+
type: bug
5+
issues:
6+
- 89542
7+

0 commit comments

Comments
 (0)