Skip to content

Commit

Permalink
Merge branch 'main' into remove-7.6-ml-transport-version
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoop authored Dec 13, 2024
2 parents 67aec81 + a68269b commit c29c7ad
Show file tree
Hide file tree
Showing 785 changed files with 19,391 additions and 7,066 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["8.15.6", "8.16.2", "8.17.0", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/periodic-packaging.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
Expand Down
13 changes: 7 additions & 6 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ steps:
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
Expand Down Expand Up @@ -268,8 +269,8 @@ steps:
env:
BWC_VERSION: 8.14.3

- label: "{{matrix.image}} / 8.15.6 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.6
- label: "{{matrix.image}} / 8.15.5 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.5
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -282,7 +283,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.15.6
BWC_VERSION: 8.15.5

- label: "{{matrix.image}} / 8.16.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.2
Expand All @@ -300,8 +301,8 @@ steps:
env:
BWC_VERSION: 8.16.2

- label: "{{matrix.image}} / 8.17.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.0
- label: "{{matrix.image}} / 8.17.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.1
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -314,7 +315,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.17.0
BWC_VERSION: 8.17.1

- label: "{{matrix.image}} / 8.18.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.0
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ steps:
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
Expand Down
16 changes: 8 additions & 8 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.15.6 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.6#bwcTest
- label: 8.15.5 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.5#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -297,7 +297,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.15.6
BWC_VERSION: 8.15.5
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -325,8 +325,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.17.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.0#bwcTest
- label: 8.17.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -335,7 +335,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.17.0
BWC_VERSION: 8.17.1
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -448,7 +448,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk21
BWC_VERSION: ["8.15.6", "8.16.2", "8.17.0", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -490,7 +490,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.15.6", "8.16.2", "8.17.0", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/pull-request/packaging-tests-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ steps:
- rhel-8
- rhel-9
- almalinux-8
- almalinux-9
PACKAGING_TASK:
- docker
- docker-cloud-ess
Expand Down
4 changes: 2 additions & 2 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ BWC_VERSION:
- "8.12.2"
- "8.13.4"
- "8.14.3"
- "8.15.6"
- "8.15.5"
- "8.16.2"
- "8.17.0"
- "8.17.1"
- "8.18.0"
- "9.0.0"
3 changes: 1 addition & 2 deletions .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
BWC_VERSION:
- "8.15.6"
- "8.16.2"
- "8.17.0"
- "8.17.1"
- "8.18.0"
- "9.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void setup() throws IOException {
);
includesSet = Set.of(fetchContext.includes());
excludesSet = Set.of(fetchContext.excludes());
parserConfig = XContentParserConfiguration.EMPTY.withFiltering(includesSet, excludesSet, false);
parserConfig = XContentParserConfiguration.EMPTY.withFiltering(null, includesSet, excludesSet, false);
}

private BytesReference read300BytesExample() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private XContentParserConfiguration buildParseConfig(boolean matchDotsInFieldNam
includes = null;
excludes = filters;
}
return XContentParserConfiguration.EMPTY.withFiltering(includes, excludes, matchDotsInFieldNames);
return XContentParserConfiguration.EMPTY.withFiltering(null, includes, excludes, matchDotsInFieldNames);
}

private BytesReference filter(XContentParserConfiguration contentParserConfiguration) throws IOException {
Expand Down
3 changes: 0 additions & 3 deletions branches.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
{
"branch": "8.x"
},
{
"branch": "8.15"
},
{
"branch": "7.17"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import org.gradle.api.Project;

import java.io.File;
import java.util.Arrays;
import java.util.Map;

/**
* This plugin configures formatting for Java source using Spotless
Expand Down Expand Up @@ -66,8 +64,7 @@ public void apply(Project project) {
java.importOrderFile(new File(elasticsearchWorkspace, importOrderPath));

// Most formatting is done through the Eclipse formatter
java.eclipse().withP2Mirrors(Map.of("https://download.eclipse.org/", "https://mirror.umd.edu/eclipse/"))
.configFile(new File(elasticsearchWorkspace, formatterConfigPath));
java.eclipse().configFile(new File(elasticsearchWorkspace, formatterConfigPath));

// Ensure blank lines are actually empty. Since formatters are applied in
// order, apply this one last, otherwise non-empty blank lines can creep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
// scm info only added for internal builds
internalBuild()
buildFile << """
buildParams.getGitOriginProperty().set("https://some-repo.com/repo.git")
buildParams.setGitOrigin("https://some-repo.com/repo.git")
apply plugin:'elasticsearch.java'
apply plugin:'elasticsearch.publish'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,20 @@ private List<Version> getReleased() {
.toList();
}

public List<Version> getReadOnlyIndexCompatible() {
// Lucene can read indices in version N-2
int compatibleMajor = currentVersion.getMajor() - 2;
return versions.stream().filter(v -> v.getMajor() == compatibleMajor).sorted(Comparator.naturalOrder()).toList();
}

public void withLatestReadOnlyIndexCompatible(Consumer<Version> versionAction) {
var compatibleVersions = getReadOnlyIndexCompatible();
if (compatibleVersions == null || compatibleVersions.isEmpty()) {
throw new IllegalStateException("No read-only compatible version found.");
}
versionAction.accept(compatibleVersions.getLast());
}

/**
* Return versions of Elasticsearch which are index compatible with the current version.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum DockerBase {
// Chainguard based wolfi image with latest jdk
// This is usually updated via renovatebot
// spotless:off
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:32f06b169bb4b0f257fbb10e8c8379f06d3ee1355c89b3327cb623781a29590e",
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:1b51ff6dba78c98d3e02b0cd64a8ce3238c7a40408d21e3af12a329d44db6f23",
"-wolfi",
"apk"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private static void disableTransitiveDependenciesForSourceSet(Project project, S
public void configureCompile(Project project) {
project.getExtensions().getExtraProperties().set("compactProfile", "full");
JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);
if (buildParams.getJavaToolChainSpec().isPresent()) {
if (buildParams.getJavaToolChainSpec().getOrNull() != null) {
java.toolchain(buildParams.getJavaToolChainSpec().get());
}
java.setSourceCompatibility(buildParams.getMinimumRuntimeVersion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import org.elasticsearch.gradle.OS;
import org.elasticsearch.gradle.internal.conventions.util.Util;
import org.elasticsearch.gradle.internal.info.BuildParameterExtension;
import org.elasticsearch.gradle.internal.info.GlobalBuildInfoPlugin;
import org.elasticsearch.gradle.internal.test.ErrorReportingTestListener;
import org.elasticsearch.gradle.internal.test.SimpleCommandLineArgumentProvider;
Expand All @@ -27,7 +26,6 @@
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.file.FileCollection;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.provider.Property;
import org.gradle.api.provider.ProviderFactory;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.SourceSetContainer;
Expand Down Expand Up @@ -56,8 +54,7 @@ public abstract class ElasticsearchTestBasePlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.getRootProject().getPlugins().apply(GlobalBuildInfoPlugin.class);
Property<BuildParameterExtension> buildParams = loadBuildParams(project);

var buildParams = loadBuildParams(project);
project.getPluginManager().apply(GradleTestPolicySetupPlugin.class);
// for fips mode check
project.getRootProject().getPluginManager().apply(GlobalBuildInfoPlugin.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void apply(Project project) {
project.getRootProject().getPluginManager().apply(GlobalBuildInfoPlugin.class);
project.getPlugins().apply(JvmToolchainsPlugin.class);
toolChainService = project.getExtensions().getByType(JavaToolchainService.class);
BuildParameterExtension buildParams = loadBuildParams(project).get();
var buildParams = loadBuildParams(project).get();
Boolean isCi = buildParams.isCi();
buildParams.getBwcVersions().forPreviousUnreleased((BwcVersions.UnreleasedVersionInfo unreleasedVersion) -> {
configureBwcProject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes;
import org.elasticsearch.gradle.internal.docker.DockerSupportPlugin;
import org.elasticsearch.gradle.internal.docker.DockerSupportService;
import org.elasticsearch.gradle.internal.info.BuildParameterExtension;
import org.elasticsearch.gradle.internal.info.GlobalBuildInfoPlugin;
import org.elasticsearch.gradle.util.GradleUtils;
import org.gradle.api.GradleException;
Expand Down Expand Up @@ -49,7 +48,7 @@ public void apply(Project project) {
// this is needed for isInternal
project.getRootProject().getPluginManager().apply(GlobalBuildInfoPlugin.class);
project.getRootProject().getPluginManager().apply(DockerSupportPlugin.class);
BuildParameterExtension buildParams = loadBuildParams(project).get();
var buildParams = loadBuildParams(project).get();

DistributionDownloadPlugin distributionDownloadPlugin = project.getPlugins().apply(DistributionDownloadPlugin.class);
Provider<DockerSupportService> dockerSupport = GradleUtils.getBuildService(
Expand All @@ -61,7 +60,7 @@ public void apply(Project project) {
);
registerInternalDistributionResolutions(
DistributionDownloadPlugin.getRegistrationsContainer(project),
buildParams.getBwcVersionsProperty()
buildParams.getBwcVersionsProvider()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package org.elasticsearch.gradle.internal;

import org.elasticsearch.gradle.VersionProperties;
import org.elasticsearch.gradle.internal.info.BuildParameterExtension;
import org.elasticsearch.gradle.internal.info.GlobalBuildInfoPlugin;
import org.elasticsearch.gradle.testclusters.ElasticsearchCluster;
import org.elasticsearch.gradle.testclusters.TestClustersPlugin;
Expand All @@ -26,7 +25,7 @@ public class InternalTestClustersPlugin implements Plugin<Project> {
public void apply(Project project) {
project.getPlugins().apply(InternalDistributionDownloadPlugin.class);
project.getRootProject().getRootProject().getPlugins().apply(GlobalBuildInfoPlugin.class);
BuildParameterExtension buildParams = loadBuildParams(project).get();
var buildParams = loadBuildParams(project).get();
project.getRootProject().getPluginManager().apply(InternalReaperPlugin.class);
TestClustersPlugin testClustersPlugin = project.getPlugins().apply(TestClustersPlugin.class);
testClustersPlugin.setRuntimeJava(buildParams.getRuntimeJavaHome());
Expand Down
Loading

0 comments on commit c29c7ad

Please sign in to comment.