Skip to content

Commit 55369be

Browse files
author
elasticsearchmachine
committed
Merge remote-tracking branch 'origin/main' into lucene_snapshot
2 parents 256d9d7 + 64dfed4 commit 55369be

File tree

138 files changed

+3395
-1425
lines changed

Some content is hidden

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

138 files changed

+3395
-1425
lines changed

.buildkite/hooks/pre-command

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export GRADLE_BUILD_CACHE_PASSWORD
4747
BUILDKITE_API_TOKEN=$(vault read -field=token secret/ci/elastic-elasticsearch/buildkite-api-token)
4848
export BUILDKITE_API_TOKEN
4949

50+
export GH_TOKEN="$VAULT_GITHUB_TOKEN"
51+
5052
if [[ "${USE_LUCENE_SNAPSHOT_CREDS:-}" == "true" ]]; then
5153
data=$(.buildkite/scripts/get-legacy-secret.sh aws-elastic/creds/lucene-snapshots)
5254

@@ -117,3 +119,5 @@ if [[ -f /etc/os-release ]] && grep -q '"Amazon Linux 2"' /etc/os-release; then
117119
echo "$(hostname -i | cut -d' ' -f 2) $(hostname -f)." | sudo tee /etc/dnsmasq.hosts
118120
sudo systemctl restart dnsmasq.service
119121
fi
122+
123+
.buildkite/scripts/get-latest-test-mutes.sh

.buildkite/hooks/pre-command.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ set BUILD_NUMBER=%BUILDKITE_BUILD_NUMBER%
1515
set COMPOSE_HTTP_TIMEOUT=120
1616
set JOB_BRANCH=%BUILDKITE_BRANCH%
1717

18+
set GH_TOKEN=%VAULT_GITHUB_TOKEN%
19+
1820
set GRADLE_BUILD_CACHE_USERNAME=vault read -field=username secret/ci/elastic-elasticsearch/migrated/gradle-build-cache
1921
set GRADLE_BUILD_CACHE_PASSWORD=vault read -field=password secret/ci/elastic-elasticsearch/migrated/gradle-build-cache
2022

2123
bash.exe -c "nohup bash .buildkite/scripts/setup-monitoring.sh </dev/null >/dev/null 2>&1 &"
24+
bash.exe -c "bash .buildkite/scripts/get-latest-test-mutes.sh"
2225

2326
exit /b 0

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ steps:
273273
env:
274274
BWC_VERSION: 8.14.3
275275

276-
- label: "{{matrix.image}} / 8.15.4 / packaging-tests-upgrade"
277-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.4
276+
- label: "{{matrix.image}} / 8.15.6 / packaging-tests-upgrade"
277+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.6
278278
timeout_in_minutes: 300
279279
matrix:
280280
setup:
@@ -287,7 +287,7 @@ steps:
287287
machineType: custom-16-32768
288288
buildDirectory: /dev/shm/bk
289289
env:
290-
BWC_VERSION: 8.15.4
290+
BWC_VERSION: 8.15.6
291291

292292
- label: "{{matrix.image}} / 8.16.2 / packaging-tests-upgrade"
293293
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.2

.buildkite/pipelines/periodic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ steps:
287287
- signal_reason: agent_stop
288288
limit: 3
289289

290-
- label: 8.15.4 / bwc
291-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.4#bwcTest
290+
- label: 8.15.6 / bwc
291+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.6#bwcTest
292292
timeout_in_minutes: 300
293293
agents:
294294
provider: gcp
@@ -297,7 +297,7 @@ steps:
297297
buildDirectory: /dev/shm/bk
298298
preemptible: true
299299
env:
300-
BWC_VERSION: 8.15.4
300+
BWC_VERSION: 8.15.6
301301
retry:
302302
automatic:
303303
- exit_status: "-1"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
if [[ ! "${BUILDKITE_PULL_REQUEST:-}" || "${BUILDKITE_AGENT_META_DATA_PROVIDER:-}" == "k8s" ]]; then
4+
exit 0
5+
fi
6+
7+
testMuteBranch="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-main}"
8+
testMuteFile="$(mktemp)"
9+
10+
# If this PR contains changes to muted-tests.yml, we disable this functionality
11+
# Otherwise, we wouldn't be able to test unmutes
12+
if [[ ! $(gh pr diff "$BUILDKITE_PULL_REQUEST" --name-only | grep 'muted-tests.yml') ]]; then
13+
gh api -H 'Accept: application/vnd.github.v3.raw' "repos/elastic/elasticsearch/contents/muted-tests.yml?ref=$testMuteBranch" > "$testMuteFile"
14+
15+
if [[ -s "$testMuteFile" ]]; then
16+
mkdir -p ~/.gradle
17+
# This is using gradle.properties instead of an env var so that it's easily compatible with the Windows pre-command hook
18+
echo "org.gradle.project.org.elasticsearch.additional.muted.tests=$testMuteFile" >> ~/.gradle/gradle.properties
19+
fi
20+
fi

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BWC_VERSION:
1414
- "8.12.2"
1515
- "8.13.4"
1616
- "8.14.3"
17-
- "8.15.4"
17+
- "8.15.6"
1818
- "8.16.2"
1919
- "8.17.0"
2020
- "8.18.0"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class ScriptScoreBenchmark {
7777
private final PluginsService pluginsService = new PluginsService(
7878
Settings.EMPTY,
7979
null,
80-
new PluginsLoader(null, Path.of(System.getProperty("plugins.dir")))
80+
PluginsLoader.createPluginsLoader(null, Path.of(System.getProperty("plugins.dir")))
8181
);
8282
private final ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, pluginsService.filterPlugins(ScriptPlugin.class).toList());
8383

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/MutedTestsBuildService.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
import java.io.UncheckedIOException;
2929
import java.util.ArrayList;
3030
import java.util.Collections;
31+
import java.util.LinkedHashSet;
3132
import java.util.List;
33+
import java.util.Set;
3234

3335
public abstract class MutedTestsBuildService implements BuildService<MutedTestsBuildService.Params> {
34-
private final List<String> excludePatterns = new ArrayList<>();
36+
private final Set<String> excludePatterns = new LinkedHashSet<>();
3537
private final ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());
3638

3739
public MutedTestsBuildService() {
@@ -43,23 +45,23 @@ public MutedTestsBuildService() {
4345
}
4446
}
4547

46-
public List<String> getExcludePatterns() {
48+
public Set<String> getExcludePatterns() {
4749
return excludePatterns;
4850
}
4951

50-
private List<String> buildExcludePatterns(File file) {
52+
private Set<String> buildExcludePatterns(File file) {
5153
List<MutedTest> mutedTests;
5254

5355
try (InputStream is = new BufferedInputStream(new FileInputStream(file))) {
5456
mutedTests = objectMapper.readValue(is, MutedTests.class).getTests();
5557
if (mutedTests == null) {
56-
return Collections.emptyList();
58+
return Collections.emptySet();
5759
}
5860
} catch (IOException e) {
5961
throw new UncheckedIOException(e);
6062
}
6163

62-
List<String> excludes = new ArrayList<>();
64+
Set<String> excludes = new LinkedHashSet<>();
6365
if (mutedTests.isEmpty() == false) {
6466
for (MutedTestsBuildService.MutedTest mutedTest : mutedTests) {
6567
if (mutedTest.getClassName() != null && mutedTest.getMethods().isEmpty() == false) {

docs/changelog/114193.yaml

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

docs/changelog/114227.yaml

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

0 commit comments

Comments
 (0)