Skip to content

Commit 7a9c8ab

Browse files
Merge branch 'main' into esql/remove_redundant_sort
2 parents 319cc69 + a33708d commit 7a9c8ab

File tree

480 files changed

+8466
-5047
lines changed

Some content is hidden

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

480 files changed

+8466
-5047
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ private void addJar(Project project, SourceSet sourceSet, int javaVersion) {
163163
project.getConfigurations().register("java" + javaVersion);
164164
TaskProvider<Jar> jarTask = project.getTasks().register("java" + javaVersion + "Jar", Jar.class, task -> {
165165
task.from(sourceSet.getOutput());
166+
task.getArchiveClassifier().set("java" + javaVersion);
166167
});
167168
project.getArtifacts().add("java" + javaVersion, jarTask);
168169
}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import static org.gradle.api.JavaVersion.VERSION_21;
6161
import static org.gradle.api.JavaVersion.VERSION_22;
6262
import static org.gradle.api.JavaVersion.VERSION_23;
63+
import static org.gradle.api.JavaVersion.VERSION_24;
6364

6465
@CacheableTask
6566
public abstract class ThirdPartyAuditTask extends DefaultTask {
@@ -341,8 +342,12 @@ private String runForbiddenAPIsCli() throws IOException {
341342
spec.setExecutable(javaHome.get() + "/bin/java");
342343
}
343344
spec.classpath(getForbiddenAPIsClasspath(), getThirdPartyClasspath());
344-
// Enable explicitly for each release as appropriate. Just JDK 20/21/22/23 for now, and just the vector module.
345-
if (isJavaVersion(VERSION_20) || isJavaVersion(VERSION_21) || isJavaVersion(VERSION_22) || isJavaVersion(VERSION_23)) {
345+
// Enable explicitly for each release as appropriate. Just JDK 20/21/22/23/24 for now, and just the vector module.
346+
if (isJavaVersion(VERSION_20)
347+
|| isJavaVersion(VERSION_21)
348+
|| isJavaVersion(VERSION_22)
349+
|| isJavaVersion(VERSION_23)
350+
|| isJavaVersion(VERSION_24)) {
346351
spec.jvmArgs("--add-modules", "jdk.incubator.vector");
347352
}
348353
spec.jvmArgs("-Xmx1g");

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/AddFileKeyStoreCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected void executeCommand(Terminal terminal, OptionSet options, Environment
7474
keyStore.setFile(setting, Files.readAllBytes(file));
7575
}
7676

77-
keyStore.save(env.configFile(), getKeyStorePassword().getChars());
77+
keyStore.save(env.configDir(), getKeyStorePassword().getChars());
7878
}
7979

8080
@SuppressForbidden(reason = "file arg for cli")

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/AddStringKeyStoreCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected void executeCommand(Terminal terminal, OptionSet options, Environment
100100
}
101101
}
102102

103-
keyStore.save(env.configFile(), getKeyStorePassword().getChars());
103+
keyStore.save(env.configDir(), getKeyStorePassword().getChars());
104104
}
105105

106106
}

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/BaseKeyStoreCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ public BaseKeyStoreCommand(String description, boolean keyStoreMustExist) {
3939
@Override
4040
public final void execute(Terminal terminal, OptionSet options, Environment env, ProcessInfo processInfo) throws Exception {
4141
try {
42-
final Path configFile = env.configFile();
42+
final Path configFile = env.configDir();
4343
keyStore = KeyStoreWrapper.load(configFile);
4444
if (keyStore == null) {
4545
if (keyStoreMustExist) {
4646
throw new UserException(
4747
ExitCodes.DATA_ERROR,
4848
"Elasticsearch keystore not found at ["
49-
+ KeyStoreWrapper.keystorePath(env.configFile())
49+
+ KeyStoreWrapper.keystorePath(env.configDir())
5050
+ "]. Use 'create' command to create one."
5151
);
5252
} else if (options.has(forceOption) == false) {

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/ChangeKeyStorePasswordCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ChangeKeyStorePasswordCommand extends BaseKeyStoreCommand {
3131
protected void executeCommand(Terminal terminal, OptionSet options, Environment env) throws Exception {
3232
try (SecureString newPassword = readPassword(terminal, true)) {
3333
final KeyStoreWrapper keyStore = getKeyStore();
34-
keyStore.save(env.configFile(), newPassword.getChars());
34+
keyStore.save(env.configDir(), newPassword.getChars());
3535
terminal.println("Elasticsearch keystore password changed successfully.");
3636
} catch (SecurityException e) {
3737
throw new UserException(ExitCodes.DATA_ERROR, e.getMessage());

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/CreateKeyStoreCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ class CreateKeyStoreCommand extends KeyStoreAwareCommand {
4040
@Override
4141
public void execute(Terminal terminal, OptionSet options, Environment env, ProcessInfo processInfo) throws Exception {
4242
try (SecureString password = options.has(passwordOption) ? readPassword(terminal, true) : new SecureString(new char[0])) {
43-
Path keystoreFile = KeyStoreWrapper.keystorePath(env.configFile());
43+
Path keystoreFile = KeyStoreWrapper.keystorePath(env.configDir());
4444
if (Files.exists(keystoreFile)) {
4545
if (terminal.promptYesNo("An elasticsearch keystore already exists. Overwrite?", false) == false) {
4646
terminal.println("Exiting without creating keystore.");
4747
return;
4848
}
4949
}
5050
KeyStoreWrapper keystore = KeyStoreWrapper.create();
51-
keystore.save(env.configFile(), password.getChars());
52-
terminal.println("Created elasticsearch keystore in " + KeyStoreWrapper.keystorePath(env.configFile()));
51+
keystore.save(env.configDir(), password.getChars());
52+
terminal.println("Created elasticsearch keystore in " + KeyStoreWrapper.keystorePath(env.configDir()));
5353
} catch (SecurityException e) {
5454
throw new UserException(ExitCodes.IO_ERROR, "Error creating the elasticsearch keystore.");
5555
}

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/HasPasswordKeyStoreCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class HasPasswordKeyStoreCommand extends KeyStoreAwareCommand {
3232

3333
@Override
3434
public void execute(Terminal terminal, OptionSet options, Environment env, ProcessInfo processInfo) throws Exception {
35-
final Path configFile = env.configFile();
35+
final Path configFile = env.configDir();
3636
final KeyStoreWrapper keyStore = KeyStoreWrapper.load(configFile);
3737

3838
// We handle error printing here so we can respect the "--silent" flag

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/RemoveSettingKeyStoreCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ protected void executeCommand(Terminal terminal, OptionSet options, Environment
4545
}
4646
keyStore.remove(setting);
4747
}
48-
keyStore.save(env.configFile(), getKeyStorePassword().getChars());
48+
keyStore.save(env.configDir(), getKeyStorePassword().getChars());
4949
}
5050
}

distribution/tools/keystore-cli/src/main/java/org/elasticsearch/cli/keystore/UpgradeKeyStoreCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class UpgradeKeyStoreCommand extends BaseKeyStoreCommand {
2626

2727
@Override
2828
protected void executeCommand(final Terminal terminal, final OptionSet options, final Environment env) throws Exception {
29-
KeyStoreWrapper.upgrade(getKeyStore(), env.configFile(), getKeyStorePassword().getChars());
29+
KeyStoreWrapper.upgrade(getKeyStore(), env.configDir(), getKeyStorePassword().getChars());
3030
}
3131

3232
}

0 commit comments

Comments
 (0)