Skip to content

Commit 1e4de28

Browse files
authored
Merge branch 'main' into arbitrary-intervals-of-month-year-buckets
2 parents 8f290e0 + 091ea9a commit 1e4de28

File tree

91 files changed

+6032
-2953
lines changed

Some content is hidden

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

91 files changed

+6032
-2953
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/dependencies/patches/hdfs/HdfsClassPatcher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
import java.util.regex.Pattern;
4141

4242
import static java.util.Map.entry;
43+
import static org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
44+
import static org.objectweb.asm.ClassWriter.COMPUTE_MAXS;
4345

4446
@CacheableTransform
4547
public abstract class HdfsClassPatcher implements TransformAction<HdfsClassPatcher.Parameters> {
@@ -128,7 +130,7 @@ private static void patchJar(File inputFile, File outputFile, Map<String, Functi
128130
byte[] classToPatch = jarFile.getInputStream(entry).readAllBytes();
129131

130132
ClassReader classReader = new ClassReader(classToPatch);
131-
ClassWriter classWriter = new ClassWriter(classReader, 0);
133+
ClassWriter classWriter = new ClassWriter(classReader, COMPUTE_FRAMES | COMPUTE_MAXS);
132134
classReader.accept(classPatcher.apply(classWriter), 0);
133135

134136
jos.write(classWriter.toByteArray());

distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/InstallPluginActionTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import org.elasticsearch.core.Tuple;
4949
import org.elasticsearch.env.Environment;
5050
import org.elasticsearch.env.TestEnvironment;
51+
import org.elasticsearch.jdk.RuntimeVersionFeature;
5152
import org.elasticsearch.plugin.scanner.NamedComponentScanner;
5253
import org.elasticsearch.plugins.Platforms;
5354
import org.elasticsearch.plugins.PluginDescriptor;
@@ -891,6 +892,7 @@ public void testInstallMisspelledOfficialPlugins() {
891892
}
892893

893894
public void testBatchFlag() throws Exception {
895+
assumeTrue("security policy validation only available with SecurityManager", RuntimeVersionFeature.isSecurityManagerAvailable());
894896
installPlugin(true);
895897
assertThat(terminal.getErrorOutput(), containsString("WARNING: plugin requires additional permissions"));
896898
assertThat(terminal.getOutput(), containsString("-> Downloading"));
@@ -1529,6 +1531,7 @@ private void assertPolicyConfirmation(Tuple<Path, Environment> pathEnvironmentTu
15291531
}
15301532

15311533
public void testPolicyConfirmation() throws Exception {
1534+
assumeTrue("security policy parsing only available with SecurityManager", RuntimeVersionFeature.isSecurityManagerAvailable());
15321535
writePluginSecurityPolicy(pluginDir, "getClassLoader", "setFactory");
15331536
InstallablePlugin pluginZip = createPluginZip("fake", pluginDir);
15341537

docs/changelog/112903.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ breaking:
1313
`single-node`.
1414
impact: >-
1515
Remove any value for `discovery.type` from your `elasticsearch.yml`
16-
configuration file.
16+
configuration file except for `multi-node` and `single-node`.
1717
notable: false

docs/changelog/121948.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 121948
2+
summary: Add initial grammar and changes for FORK
3+
area: ES|QL
4+
type: feature
5+
issues: []

docs/changelog/122708.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122708
2+
summary: Support partial results in CCS in ES|QL
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/reference/migration/apis/data-stream-reindex.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ from the original backing indices are copied to the resulting backing indices.
2121
This api runs in the background because reindexing all indices in a large data stream
2222
is expected to take a large amount of time and resources. The endpoint will return immediately and a persistent
2323
task will be created to run in the background. The current status of the task can be checked with
24-
the <<data-stream-reindex-status-api,reindex status API>>. This status will be available for 24 hours after the task completes, whether
25-
it finished successfully or failed. If the status is still available for a task, the task must be cancelled before it can be re-run.
26-
A running or recently completed data stream reindex task can be cancelled using the <<data-stream-reindex-cancel-api,reindex cancel API>>.
24+
the <<data-stream-reindex-status-api,reindex status API>>. This status will be available for 24 hours after the task
25+
completes, whether it finished successfully or failed. However, only the last status is retained so re-running a reindex
26+
will overwrite the previous status for that data stream. A running or recently completed data stream reindex task can be
27+
cancelled using the <<data-stream-reindex-cancel-api,reindex cancel API>>.
2728

2829
///////////////////////////////////////////////////////////
2930
[source,console]

docs/reference/migration/migrate_9_0.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Remove `xpack.searchable.snapshot.allocate_on_rolling_restart` from your setting
119119
Earlier versions of {es} had a `discovery.type` setting which permitted values that referred to legacy discovery types. From v9.0.0 onwards, the only supported values for this setting are `multi-node` (the default) and `single-node`.
120120
121121
*Impact* +
122-
Remove any value for `discovery.type` from your `elasticsearch.yml` configuration file.
122+
Remove any value for `discovery.type` from your `elasticsearch.yml` configuration file except for `multi-node` and `single-node`.
123123
====
124124

125125
[discrete]

libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public record BootstrapArgs(
4242
Function<String, Path> repoDirResolver,
4343
Path[] dataDirs,
4444
Path configDir,
45+
Path libDir,
4546
Path logsDir,
4647
Path tempDir
4748
) {
@@ -56,6 +57,7 @@ public record BootstrapArgs(
5657
throw new IllegalArgumentException("must provide at least one data directory");
5758
}
5859
requireNonNull(configDir);
60+
requireNonNull(libDir);
5961
requireNonNull(logsDir);
6062
requireNonNull(tempDir);
6163
}
@@ -78,6 +80,7 @@ public static BootstrapArgs bootstrapArgs() {
7880
* @param repoDirResolver a functor to map a repository location to its Elasticsearch path.
7981
* @param dataDirs data directories for Elasticsearch
8082
* @param configDir the config directory for Elasticsearch
83+
* @param libDir the lib directory for Elasticsearch
8184
* @param tempDir the temp directory for Elasticsearch
8285
* @param logsDir the log directory for Elasticsearch
8386
*/
@@ -89,6 +92,7 @@ public static void bootstrap(
8992
Function<String, Path> repoDirResolver,
9093
Path[] dataDirs,
9194
Path configDir,
95+
Path libDir,
9296
Path logsDir,
9397
Path tempDir
9498
) {
@@ -104,6 +108,7 @@ public static void bootstrap(
104108
repoDirResolver,
105109
dataDirs,
106110
configDir,
111+
libDir,
107112
logsDir,
108113
tempDir
109114
);

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/EntitlementInitialization.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ private static PolicyManager createPolicyManager() {
234234
Collections.addAll(
235235
serverScopes,
236236
new Scope("org.bouncycastle.fips.tls", List.of(new FilesEntitlement(List.of(FileData.ofPath(trustStorePath, READ))))),
237-
new Scope("org.bouncycastle.fips.core", List.of(new ManageThreadsEntitlement()))
237+
new Scope(
238+
"org.bouncycastle.fips.core",
239+
// read to lib dir is required for checksum validation
240+
List.of(new FilesEntitlement(List.of(FileData.ofPath(bootstrapArgs.libDir(), READ))), new ManageThreadsEntitlement())
241+
)
238242
);
239243
}
240244

modules/repository-s3/src/main/plugin-metadata/entitlement-policy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ ALL-UNNAMED:
55
- relative_path: "repository-s3/aws-web-identity-token-file"
66
relative_to: "config"
77
mode: "read"
8+
- relative_path: ".aws/"
9+
relative_to: "home"
10+
mode: "read"

0 commit comments

Comments
 (0)