forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
2,135 additions
and
714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 100650 | ||
summary: "ESQL: Improve verifier error for incorrect agg declaration" | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 100641 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 100760 | ||
summary: Remove noisy 'Could not find trained model' message | ||
area: Machine Learning | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 99983 | ||
summary: Use non-deprecated SAML callback URL in tests | ||
area: Authorization | ||
type: enhancement | ||
issues: | ||
- 99985 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 99983 | ||
summary: Use non-deprecated SAML callback URL in SAML smoketests | ||
area: Authorization | ||
type: enhancement | ||
issues: | ||
- 99986 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 99107 | ||
summary: Wait to gracefully stop deployments until alternative allocation exists | ||
area: Machine Learning | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 99852 | ||
summary: Record more detailed HTTP stats | ||
area: Network | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
qa/smoke-test-http/src/javaRestTest/java/org/elasticsearch/http/HttpStatsIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
package org.elasticsearch.http; | ||
|
||
import org.elasticsearch.client.Request; | ||
import org.elasticsearch.client.Response; | ||
import org.elasticsearch.client.RestClient; | ||
import org.elasticsearch.common.xcontent.XContentHelper; | ||
import org.elasticsearch.test.ESIntegTestCase; | ||
import org.elasticsearch.test.XContentTestUtils; | ||
import org.elasticsearch.xcontent.json.JsonXContent; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.hamcrest.Matchers.aMapWithSize; | ||
import static org.hamcrest.Matchers.equalTo; | ||
import static org.hamcrest.Matchers.greaterThan; | ||
import static org.hamcrest.Matchers.greaterThanOrEqualTo; | ||
import static org.hamcrest.Matchers.hasSize; | ||
import static org.hamcrest.Matchers.notNullValue; | ||
import static org.hamcrest.Matchers.nullValue; | ||
|
||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 0, numClientNodes = 0) | ||
public class HttpStatsIT extends HttpSmokeTestCase { | ||
|
||
@SuppressWarnings("unchecked") | ||
public void testNodeHttpStats() throws IOException { | ||
internalCluster().startNode(); | ||
performHttpRequests(); | ||
|
||
final Response response = getRestClient().performRequest(new Request("GET", "/_nodes/stats/http")); | ||
assertOK(response); | ||
|
||
final Map<String, Object> responseMap = XContentHelper.convertToMap( | ||
JsonXContent.jsonXContent, | ||
response.getEntity().getContent(), | ||
false | ||
); | ||
final Map<String, Object> nodesMap = (Map<String, Object>) responseMap.get("nodes"); | ||
|
||
assertThat(nodesMap, aMapWithSize(1)); | ||
final String nodeId = nodesMap.keySet().iterator().next(); | ||
|
||
assertHttpStats(new XContentTestUtils.JsonMapView((Map<String, Object>) nodesMap.get(nodeId))); | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
public void testClusterInfoHttpStats() throws IOException { | ||
internalCluster().ensureAtLeastNumDataNodes(3); | ||
performHttpRequests(); | ||
|
||
final Response response = getRestClient().performRequest(new Request("GET", "/_info/http")); | ||
assertOK(response); | ||
|
||
final Map<String, Object> responseMap = XContentHelper.convertToMap( | ||
JsonXContent.jsonXContent, | ||
response.getEntity().getContent(), | ||
false | ||
); | ||
assertHttpStats(new XContentTestUtils.JsonMapView(responseMap)); | ||
} | ||
|
||
private void performHttpRequests() throws IOException { | ||
// basic request | ||
final RestClient restClient = getRestClient(); | ||
assertOK(restClient.performRequest(new Request("GET", "/"))); | ||
// request with body and URL placeholder | ||
final Request searchRequest = new Request("GET", "*/_search"); | ||
searchRequest.setJsonEntity(""" | ||
{"query":{"match_all":{}}}"""); | ||
assertOK(restClient.performRequest(searchRequest)); | ||
// chunked response | ||
assertOK(restClient.performRequest(new Request("GET", "/_cluster/state"))); | ||
// chunked text response | ||
assertOK(restClient.performRequest(new Request("GET", "/_cat/nodes"))); | ||
} | ||
|
||
private void assertHttpStats(XContentTestUtils.JsonMapView jsonMapView) { | ||
final List<String> routes = List.of("/", "/_cat/nodes", "/{index}/_search", "/_cluster/state"); | ||
|
||
for (var route : routes) { | ||
assertThat(route, jsonMapView.get("http.routes." + route), notNullValue()); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".requests.count"), equalTo(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".requests.total_size_in_bytes"), greaterThanOrEqualTo(0)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.count"), equalTo(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.total_size_in_bytes"), greaterThan(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".requests.size_histogram"), hasSize(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".requests.size_histogram.0.count"), equalTo(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".requests.size_histogram.0.lt_bytes"), notNullValue()); | ||
if (route.equals("/{index}/_search")) { | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".requests.size_histogram.0.ge_bytes"), notNullValue()); | ||
} | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.size_histogram"), hasSize(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.size_histogram.0.count"), equalTo(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.size_histogram.0.lt_bytes"), notNullValue()); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.size_histogram.0.ge_bytes"), notNullValue()); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.handling_time_histogram"), hasSize(1)); | ||
assertThat(route, jsonMapView.get("http.routes." + route + ".responses.handling_time_histogram.0.count"), equalTo(1)); | ||
final int ltMillis = jsonMapView.get("http.routes." + route + ".responses.handling_time_histogram.0.lt_millis"); | ||
assertThat(route, ltMillis, notNullValue()); | ||
assertThat( | ||
route, | ||
jsonMapView.get("http.routes." + route + ".responses.handling_time_histogram.0.ge_millis"), | ||
ltMillis > 1 ? notNullValue() : nullValue() | ||
); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
rest-api-spec/src/main/resources/rest-api-spec/api/inference.delete_model.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rest-api-spec/src/main/resources/rest-api-spec/api/inference.get_model.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rest-api-spec/src/main/resources/rest-api-spec/api/inference.inference.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_model.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.