Skip to content

Commit a83619b

Browse files
authored
Merge branch 'main' into tsdb_agg_no_test
2 parents c911d0d + 65a8e77 commit a83619b

File tree

32 files changed

+260
-440
lines changed

32 files changed

+260
-440
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def generateUpgradeCompatibilityFile = tasks.register("generateUpgradeCompatibil
241241
}
242242

243243
def upgradeCompatibilityZip = tasks.register("upgradeCompatibilityZip", Zip) {
244-
archiveFile.set(project.layout.buildDirectory.file("rolling-upgrade-compatible-${VersionProperties.elasticsearch}.zip"))
244+
archiveFile.set(project.layout.buildDirectory.file("distributions/rolling-upgrade-compatible-${VersionProperties.elasticsearch}.zip"))
245245
from(generateUpgradeCompatibilityFile)
246246
}
247247

docs/changelog/124001.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pr: 124001
2+
summary: Use a must boolean statement when pushing down to Lucene when scoring is
3+
also needed
4+
area: ES|QL
5+
type: bug
6+
issues:
7+
- 123967

docs/reference/elasticsearch/configuration-reference/node-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The following additional roles are available:
4646

4747
* `voting_only`
4848

49-
$$$coordinating-only-node$$$If you leave `node.roles` unset, then the node is considered to be a [coordinating only node](docs-content://deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles.md#coordinating-only-node-role).
49+
$$$coordinating-only-node$$$If If you set `node.roles` to an empty array (`node.roles: [ ]`), then the node is considered to be a [coordinating only node](docs-content://deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles.md#coordinating-only-node-role).
5050

5151
::::{important}
5252
If you set `node.roles`, ensure you specify every node role your cluster needs. Every cluster requires the following node roles:

modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/RegisteredDomainProcessorTests.java

Lines changed: 75 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,45 @@
1313
import org.elasticsearch.ingest.TestIngestDocument;
1414
import org.elasticsearch.test.ESTestCase;
1515

16+
import java.util.Collections;
1617
import java.util.Map;
1718

18-
import static org.hamcrest.Matchers.containsString;
19-
import static org.hamcrest.Matchers.equalTo;
19+
import static java.util.Map.entry;
20+
import static org.hamcrest.Matchers.anEmptyMap;
21+
import static org.hamcrest.Matchers.is;
2022

2123
/**
2224
* Test parsing of an eTLD from a FQDN. The list of eTLDs is maintained here:
2325
* https://github.com/publicsuffix/list/blob/master/public_suffix_list.dat
24-
*
25-
* Effective TLDs (eTLS) are not the same as DNS TLDs. Uses for eTLDs are listed here.
26+
* <p>
27+
* Effective TLDs (eTLDs) are not the same as DNS TLDs. Uses for eTLDs are listed here:
2628
* https://publicsuffix.org/learn/
2729
*/
2830
public class RegisteredDomainProcessorTests extends ESTestCase {
29-
private Map<String, Object> buildEvent(String domain) {
30-
return Map.of("domain", domain);
31-
}
3231

3332
public void testBasic() throws Exception {
34-
testRegisteredDomainProcessor(buildEvent("www.google.com"), "www.google.com", "google.com", "com", "www");
35-
testRegisteredDomainProcessor(buildEvent("google.com"), "google.com", "google.com", "com", null);
36-
testRegisteredDomainProcessor(buildEvent(""), null, null, null, null);
37-
testRegisteredDomainProcessor(buildEvent("."), null, null, null, null);
38-
testRegisteredDomainProcessor(buildEvent("$"), null, null, null, null);
39-
testRegisteredDomainProcessor(buildEvent("foo.bar.baz"), null, null, null, null);
40-
testRegisteredDomainProcessor(buildEvent("www.books.amazon.co.uk"), "www.books.amazon.co.uk", "amazon.co.uk", "co.uk", "www.books");
33+
testRegisteredDomainProcessor("www.google.com", "www.google.com", "google.com", "com", "www");
34+
testRegisteredDomainProcessor("google.com", "google.com", "google.com", "com", null);
35+
testRegisteredDomainProcessor("", null, null, null, null);
36+
testRegisteredDomainProcessor(".", null, null, null, null);
37+
testRegisteredDomainProcessor("$", null, null, null, null);
38+
testRegisteredDomainProcessor("foo.bar.baz", null, null, null, null);
39+
testRegisteredDomainProcessor("www.books.amazon.co.uk", "www.books.amazon.co.uk", "amazon.co.uk", "co.uk", "www.books");
4140
// Verify "com" is returned as the eTLD, for that FQDN or subdomain
42-
testRegisteredDomainProcessor(buildEvent("com"), "com", null, "com", null);
43-
testRegisteredDomainProcessor(buildEvent("example.com"), "example.com", "example.com", "com", null);
44-
testRegisteredDomainProcessor(buildEvent("googleapis.com"), "googleapis.com", "googleapis.com", "com", null);
41+
testRegisteredDomainProcessor("com", "com", null, "com", null);
42+
testRegisteredDomainProcessor("example.com", "example.com", "example.com", "com", null);
43+
testRegisteredDomainProcessor("googleapis.com", "googleapis.com", "googleapis.com", "com", null);
4544
testRegisteredDomainProcessor(
46-
buildEvent("content-autofill.googleapis.com"),
45+
"content-autofill.googleapis.com",
4746
"content-autofill.googleapis.com",
4847
"googleapis.com",
4948
"com",
5049
"content-autofill"
5150
);
5251
// Verify "ssl.fastly.net" is returned as the eTLD, for that FQDN or subdomain
52+
testRegisteredDomainProcessor("global.ssl.fastly.net", "global.ssl.fastly.net", "global.ssl.fastly.net", "ssl.fastly.net", null);
5353
testRegisteredDomainProcessor(
54-
buildEvent("global.ssl.fastly.net"),
55-
"global.ssl.fastly.net",
56-
"global.ssl.fastly.net",
57-
"ssl.fastly.net",
58-
null
59-
);
60-
testRegisteredDomainProcessor(
61-
buildEvent("1.www.global.ssl.fastly.net"),
54+
"1.www.global.ssl.fastly.net",
6255
"1.www.global.ssl.fastly.net",
6356
"global.ssl.fastly.net",
6457
"ssl.fastly.net",
@@ -67,76 +60,81 @@ public void testBasic() throws Exception {
6760
}
6861

6962
public void testUseRoot() throws Exception {
70-
Map<String, Object> source = buildEvent("www.google.co.uk");
71-
72-
String domainField = "domain";
73-
String registeredDomainField = "registered_domain";
74-
String topLevelDomainField = "top_level_domain";
75-
String subdomainField = "subdomain";
76-
7763
var processor = new RegisteredDomainProcessor(null, null, "domain", "", false);
78-
79-
IngestDocument input = TestIngestDocument.withDefaultVersion(source);
80-
IngestDocument output = processor.execute(input);
81-
82-
String domain = output.getFieldValue(domainField, String.class);
83-
assertThat(domain, equalTo("www.google.co.uk"));
84-
String registeredDomain = output.getFieldValue(registeredDomainField, String.class);
85-
assertThat(registeredDomain, equalTo("google.co.uk"));
86-
String eTLD = output.getFieldValue(topLevelDomainField, String.class);
87-
assertThat(eTLD, equalTo("co.uk"));
88-
String subdomain = output.getFieldValue(subdomainField, String.class);
89-
assertThat(subdomain, equalTo("www"));
64+
IngestDocument document = TestIngestDocument.withDefaultVersion(Map.of("domain", "www.google.co.uk"));
65+
processor.execute(document);
66+
assertThat(
67+
document.getSource(),
68+
is(
69+
Map.ofEntries(
70+
entry("domain", "www.google.co.uk"),
71+
entry("registered_domain", "google.co.uk"),
72+
entry("top_level_domain", "co.uk"),
73+
entry("subdomain", "www")
74+
)
75+
)
76+
);
9077
}
9178

9279
public void testError() throws Exception {
93-
IllegalArgumentException e = expectThrows(
94-
IllegalArgumentException.class,
95-
() -> testRegisteredDomainProcessor(buildEvent("foo.bar.baz"), null, null, null, null, false)
96-
);
97-
assertThat(e.getMessage(), containsString("unable to set domain information for document"));
98-
e = expectThrows(
99-
IllegalArgumentException.class,
100-
() -> testRegisteredDomainProcessor(buildEvent("$"), null, null, null, null, false)
101-
);
102-
assertThat(e.getMessage(), containsString("unable to set domain information for document"));
80+
var processor = new RegisteredDomainProcessor(null, null, "domain", "", false);
81+
82+
{
83+
IngestDocument document = TestIngestDocument.withDefaultVersion(Map.of("domain", "foo.bar.baz"));
84+
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> processor.execute(document));
85+
assertThat(e.getMessage(), is("unable to set domain information for document"));
86+
assertThat(document.getSource(), is(Map.of("domain", "foo.bar.baz")));
87+
}
88+
89+
{
90+
IngestDocument document = TestIngestDocument.withDefaultVersion(Map.of("domain", "$"));
91+
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> processor.execute(document));
92+
assertThat(e.getMessage(), is("unable to set domain information for document"));
93+
assertThat(document.getSource(), is(Map.of("domain", "$")));
94+
}
10395
}
10496

105-
private void testRegisteredDomainProcessor(
106-
Map<String, Object> source,
107-
String expectedDomain,
108-
String expectedRegisteredDomain,
109-
String expectedETLD,
110-
String expectedSubdomain
111-
) throws Exception {
112-
testRegisteredDomainProcessor(source, expectedDomain, expectedRegisteredDomain, expectedETLD, expectedSubdomain, true);
97+
public void testIgnoreMissing() throws Exception {
98+
{
99+
var processor = new RegisteredDomainProcessor(null, null, "domain", "", false);
100+
IngestDocument document = TestIngestDocument.withDefaultVersion(Map.of());
101+
IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> processor.execute(document));
102+
assertThat(e.getMessage(), is("field [domain] not present as part of path [domain]"));
103+
assertThat(document.getSource(), is(anEmptyMap()));
104+
}
105+
106+
{
107+
var processor = new RegisteredDomainProcessor(null, null, "domain", "", true);
108+
IngestDocument document = TestIngestDocument.withDefaultVersion(Collections.singletonMap("domain", null));
109+
processor.execute(document);
110+
assertThat(document.getSource(), is(Collections.singletonMap("domain", null)));
111+
}
113112
}
114113

115114
private void testRegisteredDomainProcessor(
116-
Map<String, Object> source,
115+
String fqdn,
117116
String expectedDomain,
118117
String expectedRegisteredDomain,
119118
String expectedETLD,
120-
String expectedSubdomain,
121-
boolean ignoreMissing
119+
String expectedSubdomain
122120
) throws Exception {
123121
String domainField = "url.domain";
124122
String registeredDomainField = "url.registered_domain";
125123
String topLevelDomainField = "url.top_level_domain";
126124
String subdomainField = "url.subdomain";
127125

128-
var processor = new RegisteredDomainProcessor(null, null, "domain", "url", ignoreMissing);
126+
var processor = new RegisteredDomainProcessor(null, null, "domain", "url", true);
129127

130-
IngestDocument input = TestIngestDocument.withDefaultVersion(source);
131-
IngestDocument output = processor.execute(input);
128+
IngestDocument document = TestIngestDocument.withDefaultVersion(Map.of("domain", fqdn));
129+
processor.execute(document);
132130

133-
String domain = output.getFieldValue(domainField, String.class, expectedDomain == null);
134-
assertThat(domain, equalTo(expectedDomain));
135-
String registeredDomain = output.getFieldValue(registeredDomainField, String.class, expectedRegisteredDomain == null);
136-
assertThat(registeredDomain, equalTo(expectedRegisteredDomain));
137-
String eTLD = output.getFieldValue(topLevelDomainField, String.class, expectedETLD == null);
138-
assertThat(eTLD, equalTo(expectedETLD));
139-
String subdomain = output.getFieldValue(subdomainField, String.class, expectedSubdomain == null);
140-
assertThat(subdomain, equalTo(expectedSubdomain));
131+
String domain = document.getFieldValue(domainField, String.class, expectedDomain == null);
132+
assertThat(domain, is(expectedDomain));
133+
String registeredDomain = document.getFieldValue(registeredDomainField, String.class, expectedRegisteredDomain == null);
134+
assertThat(registeredDomain, is(expectedRegisteredDomain));
135+
String eTLD = document.getFieldValue(topLevelDomainField, String.class, expectedETLD == null);
136+
assertThat(eTLD, is(expectedETLD));
137+
String subdomain = document.getFieldValue(subdomainField, String.class, expectedSubdomain == null);
138+
assertThat(subdomain, is(expectedSubdomain));
141139
}
142140
}

muted-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ tests:
333333
- class: org.elasticsearch.smoketest.MlWithSecurityIT
334334
method: test {yaml=ml/3rd_party_deployment/Test start deployment fails while model download in progress}
335335
issue: https://github.com/elastic/elasticsearch/issues/120814
336-
- class: org.elasticsearch.test.apmintegration.MetricsApmIT
337-
method: testApmIntegration
338-
issue: https://github.com/elastic/elasticsearch/issues/124106
336+
- class: org.elasticsearch.xpack.esql.plugin.MatchOperatorIT
337+
method: testScoring_Zero_OutsideQuery
338+
issue: https://github.com/elastic/elasticsearch/issues/124132
339339

340340
# Examples:
341341
#

rest-api-spec/src/main/resources/rest-api-spec/api/ml.get_trained_models.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@
4343
"required":false,
4444
"description":"A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none."
4545
},
46-
"include_model_definition":{
47-
"type":"boolean",
48-
"required":false,
49-
"description":"Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false.",
50-
"default":false,
51-
"deprecated": true
52-
},
5346
"decompress_definition":{
5447
"type":"boolean",
5548
"required":false,

rest-api-spec/src/main/resources/rest-api-spec/api/ml.infer_trained_model.json

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,6 @@
2424
"required":true
2525
}
2626
}
27-
},
28-
{
29-
"path":"/_ml/trained_models/{model_id}/deployment/_infer",
30-
"methods":[
31-
"POST"
32-
],
33-
"parts":{
34-
"model_id":{
35-
"type":"string",
36-
"description":"The unique identifier of the trained model.",
37-
"required":true
38-
}
39-
},
40-
"deprecated": {
41-
"version":"8.3.0",
42-
"description": "/_ml/trained_models/{model_id}/deployment/_infer is deprecated. Use /_ml/trained_models/{model_id}/_infer instead"
43-
}
4427
}
4528
]
4629
},

rest-api-spec/src/main/resources/rest-api-spec/api/ml.stop_datafeed.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
"required":false,
3333
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
3434
},
35-
"allow_no_datafeeds":{
36-
"type":"boolean",
37-
"required":false,
38-
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
39-
"deprecated":true
40-
},
4135
"force":{
4236
"type":"boolean",
4337
"required":false,

server/src/test/java/org/elasticsearch/common/logging/HeaderWarningTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ public void testAddComplexWarning() {
315315
+ "profiling-symbols,synthetics] with patterns (.deprecation-indexing-template => [.logs-deprecation.*],"
316316
+ ".fleet-file-data => [.fleet-file-data-*-*],.fleet-files => [.fleet-files-*-*],.ml-anomalies- => [.ml-anomalies-*],"
317317
+ ".ml-notifications-000002 => [.ml-notifications-000002],.ml-state => [.ml-state*],.ml-stats => [.ml-stats-*],"
318-
+ ".monitoring-beats-mb => [.monitoring-beats-9-*],.monitoring-ent-search-mb => [.monitoring-ent-search-8-*],"
319-
+ ".monitoring-es-mb => [.monitoring-es-9-*],.monitoring-kibana-mb => [.monitoring-kibana-9-*],"
320-
+ ".monitoring-logstash-mb => [.monitoring-logstash-9-*],.profiling-ilm-lock => [.profiling-ilm-lock*],"
318+
+ ".monitoring-beats-mb => [.monitoring-beats-8-*],.monitoring-ent-search-mb => [.monitoring-ent-search-8-*],"
319+
+ ".monitoring-es-mb => [.monitoring-es-8-*],.monitoring-kibana-mb => [.monitoring-kibana-8-*],"
320+
+ ".monitoring-logstash-mb => [.monitoring-logstash-8-*],.profiling-ilm-lock => [.profiling-ilm-lock*],"
321321
+ ".slm-history => [.slm-history-7*],.watch-history-16 => [.watcher-history-16*],"
322322
+ "behavioral_analytics-events-default => [behavioral_analytics-events-*],ilm-history => [ilm-history-7*],"
323323
+ "logs => [logs-*-*],metrics => [metrics-*-*],profiling-events => [profiling-events*],profiling-executables => "

x-pack/plugin/core/template-resources/src/main/resources/monitoring-ent-search-mb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"index_patterns": [".monitoring-ent-search-8-*"],
2+
"index_patterns": [".monitoring-ent-search-${xpack.stack.monitoring.template.version}-*"],
33
"version": ${xpack.stack.monitoring.template.release.version},
44
"_meta": {
55
"description": "Template used by Enterprise Search Metricbeat module monitoring information for Stack Monitoring",

0 commit comments

Comments
 (0)