Skip to content

Commit 8a34ec7

Browse files
Merge pull request #156 from elastic/master
🤖 ESQL: Merge upstream
2 parents 5112381 + 3a9e511 commit 8a34ec7

File tree

78 files changed

+1038
-546
lines changed

Some content is hidden

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

78 files changed

+1038
-546
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public class Jdk implements Buildable, Iterable<File> {
2424

2525
private static final List<String> ALLOWED_ARCHITECTURES = List.of("aarch64", "x64");
26-
private static final List<String> ALLOWED_VENDORS = List.of("adoptium", "openjdk");
26+
private static final List<String> ALLOWED_VENDORS = List.of("adoptium", "openjdk", "zulu");
2727
private static final List<String> ALLOWED_PLATFORMS = List.of("darwin", "linux", "windows", "mac");
2828
private static final Pattern VERSION_PATTERN = Pattern.compile(
2929
"(\\d+)(\\.\\d+\\.\\d+(?:\\.\\d+)?)?\\+(\\d+(?:\\.\\d+)?)(@([a-f0-9]{32}))?"
@@ -37,6 +37,7 @@ public class Jdk implements Buildable, Iterable<File> {
3737
private final Property<String> version;
3838
private final Property<String> platform;
3939
private final Property<String> architecture;
40+
private final Property<String> distributionVersion;
4041
private String baseVersion;
4142
private String major;
4243
private String build;
@@ -49,6 +50,7 @@ public class Jdk implements Buildable, Iterable<File> {
4950
this.version = objectFactory.property(String.class);
5051
this.platform = objectFactory.property(String.class);
5152
this.architecture = objectFactory.property(String.class);
53+
this.distributionVersion = objectFactory.property(String.class);
5254
}
5355

5456
public String getName() {
@@ -104,6 +106,14 @@ public void setArchitecture(final String architecture) {
104106
this.architecture.set(architecture);
105107
}
106108

109+
public String getDistributionVersion() {
110+
return distributionVersion.get();
111+
}
112+
113+
public void setDistributionVersion(String distributionVersion) {
114+
this.distributionVersion.set(distributionVersion);
115+
}
116+
107117
public String getBaseVersion() {
108118
return baseVersion;
109119
}
@@ -179,6 +189,7 @@ void finalizeValues() {
179189
platform.finalizeValue();
180190
vendor.finalizeValue();
181191
architecture.finalizeValue();
192+
distributionVersion.finalizeValue();
182193
}
183194

184195
@Override

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class JdkDownloadPlugin implements Plugin<Project> {
2626

2727
public static final String VENDOR_ADOPTIUM = "adoptium";
2828
public static final String VENDOR_OPENJDK = "openjdk";
29+
public static final String VENDOR_ZULU = "zulu";
2930

3031
private static final String REPO_NAME_PREFIX = "jdk_repo_";
3132
private static final String EXTENSION_NAME = "jdks";
@@ -125,6 +126,17 @@ private void setupRepository(Project project, Jdk jdk) {
125126
+ jdk.getBuild()
126127
+ "/GPL/openjdk-[revision]_[module]-[classifier]_bin.[ext]";
127128
}
129+
} else if (jdk.getVendor().equals(VENDOR_ZULU)) {
130+
repoUrl = "https://cdn.azul.com";
131+
if (jdk.getMajor().equals("8") && isJdkOnMacOsPlatform(jdk) && jdk.getArchitecture().equals("aarch64")) {
132+
artifactPattern = "zulu/bin/zulu"
133+
+ jdk.getDistributionVersion()
134+
+ "-ca-jdk"
135+
+ jdk.getBaseVersion().replace("u", ".0.")
136+
+ "-[module]x_[classifier].[ext]";
137+
} else {
138+
throw new GradleException("JDK vendor zulu is supported only for JDK8 on MacOS with Apple Silicon.");
139+
}
128140
} else {
129141
throw new GradleException("Unknown JDK vendor [" + jdk.getVendor() + "]");
130142
}
@@ -147,14 +159,16 @@ public static NamedDomainObjectContainer<Jdk> getContainer(Project project) {
147159
}
148160

149161
private static String dependencyNotation(Jdk jdk) {
150-
String platformDep = jdk.getPlatform().equals("darwin") || jdk.getPlatform().equals("mac")
151-
? (jdk.getVendor().equals(VENDOR_ADOPTIUM) ? "mac" : "macos")
152-
: jdk.getPlatform();
162+
String platformDep = isJdkOnMacOsPlatform(jdk) ? (jdk.getVendor().equals(VENDOR_ADOPTIUM) ? "mac" : "macos") : jdk.getPlatform();
153163
String extension = jdk.getPlatform().equals("windows") ? "zip" : "tar.gz";
154164

155165
return groupName(jdk) + ":" + platformDep + ":" + jdk.getBaseVersion() + ":" + jdk.getArchitecture() + "@" + extension;
156166
}
157167

168+
private static boolean isJdkOnMacOsPlatform(Jdk jdk) {
169+
return jdk.getPlatform().equals("darwin") || jdk.getPlatform().equals("mac");
170+
}
171+
158172
private static String groupName(Jdk jdk) {
159173
return jdk.getVendor() + "_" + jdk.getMajor();
160174
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void testUnknownVendor() {
3636
"11.0.2+33",
3737
"linux",
3838
"x64",
39-
"unknown vendor [unknown] for jdk [testjdk], must be one of [adoptium, openjdk]"
39+
"unknown vendor [unknown] for jdk [testjdk], must be one of [adoptium, openjdk, zulu]"
4040
);
4141
}
4242

docs/changelog/87482.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 87482
2+
summary: Adding additional capability to the `master_is_stable` health indicator service
3+
area: Health
4+
type: enhancement
5+
issues: []

docs/changelog/87675.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 87675
2+
summary: Support removing ignore filters for audit logging
3+
area: Audit
4+
type: bug
5+
issues:
6+
- 68588

docs/reference/health/health.asciidoc

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ for health status set `explain` to `false` to disable the more expensive analysi
205205
`details`::
206206
(Optional, object) An object that contains additional information about the cluster that
207207
has lead to the current health status result. This data is unstructured, and each
208-
indicator may return a unique set of details. Details will not be calculated if the
208+
indicator returns <<health-api-response-details, a unique set of details>>. Details will not be calculated if the
209209
`explain` property is set to false.
210210

211211
`impacts`::
@@ -260,6 +260,123 @@ for health status set `explain` to `false` to disable the more expensive analysi
260260
=====
261261
====
262262

263+
[role="child_attributes"]
264+
[[health-api-response-details]]
265+
==== Indicator Details
266+
267+
Each health indicator in the health api returns a set of details that further explains the state of the system. The
268+
details have contents and a structure that is unique to each indicator.
269+
270+
[[health-api-response-details-master-is-stable]]
271+
===== master_is_stable
272+
273+
`current_master`::
274+
(object) Information about the currently elected master.
275+
+
276+
.Properties of `current_master`
277+
[%collapsible%open]
278+
====
279+
`node_id`::
280+
(string) The node id of the currently elected master, or null if no master is elected.
281+
282+
`name`::
283+
(string) The node name of the currently elected master, or null if no master is elected.
284+
====
285+
286+
`recent_masters`::
287+
(Optional, array) A list of nodes that have been elected or replaced as master in a recent
288+
time window. This field is present if the master
289+
is changing rapidly enough to cause problems, and also present as additional information
290+
when the indicator is `green`.
291+
+
292+
.Properties of `recent_masters`
293+
[%collapsible%open]
294+
====
295+
`node_id`::
296+
(string) The node id of a recently active master node.
297+
298+
`name`::
299+
(string) The node name of a recently active master node.
300+
====
301+
302+
`exception_fetching_history`::
303+
(Optional, object) Master history is requested from the most recently elected master node for diagnosis purposes.
304+
If fetching this remote history fails, the exception information is returned in this detail field.
305+
+
306+
.Properties of `exception_fetching_history`
307+
[%collapsible%open]
308+
====
309+
`message`::
310+
(string) The exception message for the failed history fetch operation.
311+
312+
`stack_trace`::
313+
(string) The stack trace for the failed history fetch operation.
314+
====
315+
316+
[[health-api-response-details-shards-availability]]
317+
===== shards_availability
318+
319+
`unassigned_primaries`::
320+
(int) The number of primary shards that are unassigned for reasons other than initialization or relocation.
321+
322+
`initializing_primaries`::
323+
(int) The number of primary shards that are initializing or recovering.
324+
325+
`creating_primaries`::
326+
(int) The number of primary shards that are unassigned because they have been very recently created.
327+
328+
`restarting_primaries`::
329+
(int) The number of primary shards that are relocating because of a node shutdown operation.
330+
331+
`started_primaries`::
332+
(int) The number of primary shards that are active and available on the system.
333+
334+
`unassigned_replicas`::
335+
(int) The number of replica shards that are unassigned for reasons other than initialization or relocation.
336+
337+
`initializing_replicas`::
338+
(int) The number of replica shards that are initializing or recovering.
339+
340+
`restarting_replicas`::
341+
(int) The number of replica shards that are relocating because of a node shutdown operation.
342+
343+
`started_replicas`::
344+
(int) The number of replica shards that are active and available on the sysetm.
345+
346+
347+
[[health-api-response-details-repository-integrity]]
348+
===== repository_integrity
349+
350+
`total_repositories`::
351+
(Optional, int) The number of currently configured repositories on the system. If there are no repositories
352+
configured then this detail is omitted.
353+
354+
`corrupted_repositories`::
355+
(Optional, int) The number of repositories on the system that have been determined to be corrupted. If there are
356+
no corrupted repositories detected, this detail is omitted.
357+
358+
`corrupted`::
359+
(Optional, array of strings) If corrupted repositories have been detected in the system, the names of up to ten of
360+
them are displayed in this field. If no corrupted repositories are found, this detail is omitted.
361+
362+
[[health-api-response-details-ilm]]
363+
===== ilm
364+
365+
`ilm_status`::
366+
(string) The current status of the Indexing Lifecycle Management feature. Either `STOPPED`, `STOPPING`, or `RUNNING`.
367+
368+
`policies`::
369+
(int) The number of index lifecycle policies that the system is managing.
370+
371+
[[health-api-response-details-slm]]
372+
===== slm
373+
374+
`slm_status`::
375+
(string) The current status of the Snapshot Lifecycle Management feature. Either `STOPPED`, `STOPPING`, or `RUNNING`.
376+
377+
`policies`::
378+
(int) The number of snapshot policies that the system is managing.
379+
263380
[[health-api-example]]
264381
==== {api-examples-title}
265382

docs/reference/ml/anomaly-detection/apis/get-job.asciidoc

Lines changed: 85 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-match-jobs]
5252
(Optional, Boolean)
5353
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=exclude-generated]
5454

55+
[role="child_attributes"]
5556
[[ml-get-job-results]]
5657
== {api-response-body-title}
5758

@@ -86,6 +87,38 @@ property is informational; you cannot change its value.
8687
.Properties of `datafeed_config`
8788
[%collapsible%open]
8889
====
90+
`authorization`:::
91+
(Optional, object)
92+
The security privileges that the {dfeed} uses to run its queries. If
93+
{stack-security-features} were disabled at the time of the most recent update to
94+
the {dfeed}, this property is omitted.
95+
+
96+
.Properties of `authorization`
97+
[%collapsible%open]
98+
=====
99+
`api_key`:::
100+
(object) If an API key was used for the most recent update to the {dfeed}, its
101+
name and identifier are listed in the response.
102+
+
103+
.Properties of `api_key`
104+
[%collapsible%open]
105+
======
106+
`id`::::
107+
(string) The identifier for the API key.
108+
109+
`name`::::
110+
(string) The name of the API key.
111+
======
112+
113+
`roles`:::
114+
(array of strings) If a user ID was used for the most recent update to the
115+
{dfeed}, its roles at the time of the update are listed in the response.
116+
117+
`service_account`:::
118+
(string) If a service account was used for the most recent update to the {dfeed},
119+
the account name is listed in the response.
120+
=====
121+
89122
`datafeed_id`:::
90123
(Optional, string)
91124
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id]
@@ -208,14 +241,58 @@ The API returns the following results:
208241
{
209242
"job_id" : "high_sum_total_sales",
210243
"job_type" : "anomaly_detector",
211-
"job_version" : "8.0.0",
244+
"job_version" : "8.4.0",
245+
"create_time" : 1655852735889,
246+
"finished_time" : 1655852745980,
247+
"model_snapshot_id" : "1575402237",
248+
"custom_settings" : {
249+
"created_by" : "ml-module-sample",
250+
...
251+
},
252+
"datafeed_config" : {
253+
"datafeed_id" : "datafeed-high_sum_total_sales",
254+
"job_id" : "high_sum_total_sales",
255+
"authorization" : {
256+
"roles" : [
257+
"superuser"
258+
]
259+
},
260+
"query_delay" : "93169ms",
261+
"chunking_config" : {
262+
"mode" : "auto"
263+
},
264+
"indices_options" : {
265+
"expand_wildcards" : [
266+
"open"
267+
],
268+
"ignore_unavailable" : false,
269+
"allow_no_indices" : true,
270+
"ignore_throttled" : true
271+
},
272+
"query" : {
273+
"bool" : {
274+
"filter" : [
275+
{
276+
"term" : {
277+
"event.dataset" : "sample_ecommerce"
278+
}
279+
}
280+
]
281+
}
282+
},
283+
"indices" : [
284+
"kibana_sample_data_ecommerce"
285+
],
286+
"scroll_size" : 1000,
287+
"delayed_data_check_config" : {
288+
"enabled" : true
289+
}
290+
},
212291
"groups" : [
213292
"kibana_sample_data",
214293
"kibana_sample_ecommerce"
215294
],
216295
"description" : "Find customers spending an unusually high amount in an hour",
217-
"create_time" : 1575402224732,
218-
"finished_time" : 1575402238311,
219296
"analysis_config" : {
220297
"bucket_span" : "1h",
221298
"detectors" : [
@@ -230,26 +307,23 @@ The API returns the following results:
230307
"influencers" : [
231308
"customer_full_name.keyword",
232309
"category.keyword"
233-
]
310+
],
311+
"model_prune_window": "30d"
234312
},
235313
"analysis_limits" : {
236-
"model_memory_limit" : "10mb",
314+
"model_memory_limit" : "13mb",
237315
"categorization_examples_limit" : 4
238316
},
239317
"data_description" : {
240318
"time_field" : "order_date",
241319
"time_format" : "epoch_ms"
242320
},
243321
"model_plot_config" : {
244-
"enabled" : true
322+
"enabled" : true,
323+
"annotations_enabled" : true
245324
},
246325
"model_snapshot_retention_days" : 10,
247326
"daily_model_snapshot_retention_after_days" : 1,
248-
"custom_settings" : {
249-
"created_by" : "ml-module-sample",
250-
...
251-
},
252-
"model_snapshot_id" : "1575402237",
253327
"results_index_name" : "shared",
254328
"allow_lazy_open" : false
255329
}

0 commit comments

Comments
 (0)