mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
* Fix PatternSetFactory incompatibility
* Update ospackage plugin
* Remove ambigious method definitions
* Cleanup verification metadata
* Some cleanup on unused methods and attributes
(cherry picked from commit a2e580fb60
)
# Conflicts:
# build-tools-internal/src/main/resources/minimumGradleVersion
This commit is contained in:
parent
3fdbbd61ef
commit
1bc58f68dc
14 changed files with 37 additions and 46 deletions
|
@ -1,7 +1,7 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
|
||||
distributionSha256Sum=efe9a3d147d948d7528a9887fa35abcf24ca1a43ad06439996490f77569b02d1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -25,8 +25,7 @@ import org.gradle.api.tasks.OutputDirectory;
|
|||
import org.gradle.api.tasks.SkipWhenEmpty;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
import org.gradle.api.tasks.util.PatternFilterable;
|
||||
import org.gradle.api.tasks.util.PatternSet;
|
||||
import org.gradle.internal.Factory;
|
||||
import org.gradle.api.tasks.util.internal.PatternSetFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -65,14 +64,14 @@ public class CopyRestApiTask extends DefaultTask {
|
|||
@Inject
|
||||
public CopyRestApiTask(
|
||||
ProjectLayout projectLayout,
|
||||
Factory<PatternSet> patternSetFactory,
|
||||
PatternSetFactory patternSetFactory,
|
||||
FileSystemOperations fileSystemOperations,
|
||||
ObjectFactory objectFactory
|
||||
) {
|
||||
this.include = objectFactory.listProperty(String.class);
|
||||
this.outputResourceDir = objectFactory.directoryProperty();
|
||||
this.additionalYamlTestsDir = objectFactory.directoryProperty();
|
||||
this.patternSet = patternSetFactory.create();
|
||||
this.patternSet = patternSetFactory.createPatternSet();
|
||||
this.projectLayout = projectLayout;
|
||||
this.fileSystemOperations = fileSystemOperations;
|
||||
}
|
||||
|
|
|
@ -27,8 +27,7 @@ import org.gradle.api.tasks.OutputDirectory;
|
|||
import org.gradle.api.tasks.SkipWhenEmpty;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
import org.gradle.api.tasks.util.PatternFilterable;
|
||||
import org.gradle.api.tasks.util.PatternSet;
|
||||
import org.gradle.internal.Factory;
|
||||
import org.gradle.api.tasks.util.internal.PatternSetFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
@ -64,25 +63,25 @@ public abstract class CopyRestTestsTask extends DefaultTask {
|
|||
private final ProjectLayout projectLayout;
|
||||
private final FileSystemOperations fileSystemOperations;
|
||||
|
||||
@Inject
|
||||
public abstract FileOperations getFileOperations();
|
||||
|
||||
@Inject
|
||||
public CopyRestTestsTask(
|
||||
ProjectLayout projectLayout,
|
||||
Factory<PatternSet> patternSetFactory,
|
||||
PatternSetFactory patternSetFactory,
|
||||
FileSystemOperations fileSystemOperations,
|
||||
ObjectFactory objectFactory
|
||||
) {
|
||||
this.includeCore = objectFactory.listProperty(String.class);
|
||||
this.includeXpack = objectFactory.listProperty(String.class);
|
||||
this.outputResourceDir = objectFactory.directoryProperty();
|
||||
this.corePatternSet = patternSetFactory.create();
|
||||
this.xpackPatternSet = patternSetFactory.create();
|
||||
this.corePatternSet = patternSetFactory.createPatternSet();
|
||||
this.xpackPatternSet = patternSetFactory.createPatternSet();
|
||||
this.projectLayout = projectLayout;
|
||||
this.fileSystemOperations = fileSystemOperations;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public abstract FileOperations getFileOperations();
|
||||
|
||||
@Input
|
||||
public ListProperty<String> getIncludeCore() {
|
||||
return includeCore;
|
||||
|
|
|
@ -57,7 +57,7 @@ import org.gradle.api.tasks.SkipWhenEmpty;
|
|||
import org.gradle.api.tasks.TaskAction;
|
||||
import org.gradle.api.tasks.util.PatternFilterable;
|
||||
import org.gradle.api.tasks.util.PatternSet;
|
||||
import org.gradle.internal.Factory;
|
||||
import org.gradle.api.tasks.util.internal.PatternSetFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -97,18 +97,13 @@ public abstract class RestCompatTestTransformTask extends DefaultTask {
|
|||
// PatternFilterable -> list of full test names and reasons. Needed for 1 pattern may include many tests and reasons
|
||||
private final Map<PatternFilterable, List<Pair<String, String>>> skippedTestByTestNameTransformations = new HashMap<>();
|
||||
|
||||
@Inject
|
||||
protected Factory<PatternSet> getPatternSetFactory() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Inject
|
||||
public RestCompatTestTransformTask(FileSystemOperations fileSystemOperations, ObjectFactory objectFactory) {
|
||||
this.fileSystemOperations = fileSystemOperations;
|
||||
this.compatibleVersion = Version.fromString(VersionProperties.getVersions().get("elasticsearch")).getMajor() - 1;
|
||||
this.sourceDirectory = objectFactory.directoryProperty();
|
||||
this.outputDirectory = objectFactory.directoryProperty();
|
||||
this.testPatternSet = getPatternSetFactory().create();
|
||||
this.testPatternSet = getPatternSetFactory().createPatternSet();
|
||||
this.testPatternSet.include("/*" + "*/*.yml"); // concat these strings to keep build from thinking this is invalid javadoc
|
||||
// always inject compat headers
|
||||
headers.put("Content-Type", "application/vnd.elasticsearch+json;compatible-with=" + compatibleVersion);
|
||||
|
@ -116,6 +111,9 @@ public abstract class RestCompatTestTransformTask extends DefaultTask {
|
|||
getTransformations().add(new InjectHeaders(headers, Sets.newHashSet(RestCompatTestTransformTask::doesNotHaveCatOperation)));
|
||||
}
|
||||
|
||||
@Inject
|
||||
protected abstract PatternSetFactory getPatternSetFactory();
|
||||
|
||||
private static boolean doesNotHaveCatOperation(ObjectNode doNodeValue) {
|
||||
final Iterator<String> fieldNamesIterator = doNodeValue.fieldNames();
|
||||
while (fieldNamesIterator.hasNext()) {
|
||||
|
@ -143,7 +141,7 @@ public abstract class RestCompatTestTransformTask extends DefaultTask {
|
|||
);
|
||||
}
|
||||
|
||||
PatternSet skippedPatternSet = getPatternSetFactory().create();
|
||||
PatternSet skippedPatternSet = getPatternSetFactory().createPatternSet();
|
||||
// create file patterns for all a1/a2/a3/b.yml possibilities.
|
||||
for (int i = testParts.length - 1; i > 1; i--) {
|
||||
final String lastPart = testParts[i];
|
||||
|
@ -157,7 +155,7 @@ public abstract class RestCompatTestTransformTask extends DefaultTask {
|
|||
}
|
||||
|
||||
public void skipTestsByFilePattern(String filePattern, String reason) {
|
||||
PatternSet skippedPatternSet = getPatternSetFactory().create();
|
||||
PatternSet skippedPatternSet = getPatternSetFactory().createPatternSet();
|
||||
skippedPatternSet.include(filePattern);
|
||||
skippedTestByFilePatternTransformations.put(skippedPatternSet, reason);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
8.13
|
||||
8.14
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
package org.elasticsearch.gradle.test;
|
||||
|
||||
import org.gradle.api.provider.Provider;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.process.CommandLineArgumentProvider;
|
||||
|
||||
|
@ -20,10 +19,6 @@ import java.util.stream.Collectors;
|
|||
public class SystemPropertyCommandLineArgumentProvider implements CommandLineArgumentProvider {
|
||||
private final Map<String, Object> systemProperties = new LinkedHashMap<>();
|
||||
|
||||
public void systemProperty(String key, Provider<Object> value) {
|
||||
systemProperties.put(key, (Supplier<String>) () -> String.valueOf(value.get()));
|
||||
}
|
||||
|
||||
public void systemProperty(String key, Supplier<String> value) {
|
||||
systemProperties.put(key, value);
|
||||
}
|
||||
|
|
|
@ -49,4 +49,4 @@ wiremock = "com.github.tomakehurst:wiremock-jre8-standalone:2.23.2"
|
|||
xmlunit-core = "org.xmlunit:xmlunit-core:2.8.2"
|
||||
|
||||
[plugins]
|
||||
ospackage = { id = "com.netflix.nebula.ospackage-base", version = "11.11.1" }
|
||||
ospackage = { id = "com.netflix.nebula.ospackage-base", version = "11.11.2" }
|
||||
|
|
|
@ -936,9 +936,9 @@
|
|||
<sha256 value="d694edd7bae3bc1a8e0dae2f5a22c479ff04d6b9bfcb0ab751a42f02e02d2100" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.netflix.nebula" name="gradle-ospackage-plugin" version="11.11.1">
|
||||
<artifact name="gradle-ospackage-plugin-11.11.1.jar">
|
||||
<sha256 value="34027ac840adb81b80de43082ce335a6518875217a38ac0204d5a84dc669b7ac" origin="Generated by Gradle"/>
|
||||
<component group="com.netflix.nebula" name="gradle-ospackage-plugin" version="11.11.2">
|
||||
<artifact name="gradle-ospackage-plugin-11.11.2.jar">
|
||||
<sha256 value="2cad0d0af05514e07b163d30d71c486ef1a205265ecc4821f8fb9a121f2cabe5" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.netflix.nebula" name="nebula-gradle-interop" version="2.0.0">
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,7 +1,7 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
|
||||
distributionSha256Sum=efe9a3d147d948d7528a9887fa35abcf24ca1a43ad06439996490f77569b02d1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
4
gradlew
vendored
4
gradlew
vendored
|
@ -114,7 +114,7 @@ case "$( uname )" in #(
|
|||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
|
@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
|
4
gradlew.bat
vendored
4
gradlew.bat
vendored
|
@ -70,11 +70,11 @@ goto fail
|
|||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
|
|
@ -157,11 +157,11 @@ if (OS.current() == OS.WINDOWS) {
|
|||
|
||||
tasks.named("javaRestTest").configure {
|
||||
dependsOn fixture
|
||||
systemProperty "tests.fromOld", "true"
|
||||
/* Use a closure on the string to delay evaluation until right before we
|
||||
* run the integration tests so that we can be sure that the file is
|
||||
* ready. */
|
||||
nonInputProperties.systemProperty "es${version}.port", fixture.map(f->f.addressAndPort)
|
||||
systemProperty "tests.fromOld", "true"
|
||||
/* Use a closure on the string to delay evaluation until right before we
|
||||
* run the integration tests so that we can be sure that the file is
|
||||
* ready. */
|
||||
nonInputProperties.systemProperty "es${version}.port", fixture.map(f->f.addressAndPort)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=fba8464465835e74f7270bbf43d6d8a8d7709ab0a43ce1aa3323f73e9aa0c612
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
|
||||
distributionSha256Sum=efe9a3d147d948d7528a9887fa35abcf24ca1a43ad06439996490f77569b02d1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue