-
Notifications
You must be signed in to change notification settings - Fork 25.4k
ESQL: Log profile on test error #131474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESQL: Log profile on test error #131474
Conversation
...ugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/RestEsqlTestCase.java
Show resolved
Hide resolved
Pinging @elastic/es-analytical-engine (Team:Analytics) |
@@ -302,14 +304,6 @@ protected final void doTest(String query) throws Throwable { | |||
} | |||
} | |||
|
|||
static Map<String, Object> assertNotPartial(Map<String, Object> answer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to the other class, with runEsql and assertWarnings
} | ||
|
||
public static Map<String, Object> runEsql(RequestObjectBuilder requestObject, AssertWarnings assertWarnings, Mode mode) | ||
throws IOException { | ||
return runEsql(requestObject, assertWarnings, mode, true); | ||
} | ||
|
||
public static Map<String, Object> runEsql(RequestObjectBuilder requestObject, AssertWarnings assertWarnings, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept here the overloads without the ProfileLogger param, as they will be easier to track, instead of looking for a null as a param
548ad86
to
b284c41
Compare
# Conflicts: # x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/EsqlSpecIT.java
`SampleOperator.Status` wasn't declared as a NamedWritable by the plugin, leading to serialization errors when `SAMPLE` is used with `profile: true`. It leads to an `IllegalArgumentException: Unknown NamedWriteable [org.elasticsearch.compute.operator.Operator$Status][sample]` Profiles will be tested in this PR: #131474, that's currently failing because of this bug
`SampleOperator.Status` wasn't declared as a NamedWritable by the plugin, leading to serialization errors when `SAMPLE` is used with `profile: true`. It leads to an `IllegalArgumentException: Unknown NamedWriteable [org.elasticsearch.compute.operator.Operator$Status][sample]` Profiles will be tested in this PR: elastic#131474, that's currently failing because of this bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
// new RestEsqlTestCase.RequestObjectBuilder().query("FROM test* | LIMIT 2"), | ||
// new AssertWarnings.NoWarnings(), | ||
// profileLogger | ||
// ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy. I think maybe I should look at this one. I wrote this like two years ago.
💚 CLA has been signed |
@@ -202,7 +202,7 @@ public static class Status implements Operator.Status { | |||
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry( | |||
Operator.Status.class, | |||
"page_mapping_to_iterator", | |||
AbstractPageMappingOperator.Status::new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was another serialization error
# Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
Manual 9.1 partial backport, extracted from #131474
…#131820) Manual 9.1 partial backport, extracted from elastic#131474
…#131820) Manual 9.1 partial backport, extracted from elastic#131474
…#131820) Manual 9.1 partial backport, extracted from elastic#131474
Log the ESQL request profile when a test fails.