-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: Rework FieldExtractorIT's pragmas #127117
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
Conversation
This reworks the way `FieldExtractorIT` requests fields to be loaded. Previously it used pragmas and would skip itself if it wasn't a unit test. This removes that behavior and sends pragmas but also sends the `accept_pragma_risks` option which is used in production releases to allow pragmas - it's especially useful for testing. This *should* make the tests more consistent. Closes elastic#127100
Pinging @elastic/es-analytical-engine (Team:Analytics) |
@@ -1766,6 +1753,7 @@ private Map<String, Object> runEsql(String query) throws IOException { | |||
request = request.pragmas( | |||
Settings.builder().put(QueryPragmas.FIELD_EXTRACT_PREFERENCE.getKey(), preference.toString()).build() | |||
); | |||
request.pragmasOk(); |
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 think we need to guard this for 8.16+ because accept_pragma_risks is only available in 8.16+, and FieldExtractorTestCase can run in a mixed cluster.
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.
Good call.
The release test failures are build failures because it wants a release copy of metricbeat which is not yet available. Fun. |
Serverless failure is real. Checking. |
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.
LGTM. Thanks Nik!
This is a spurious failure. I'm ignoring it. Let's see how many more we get like this. |
💔 Backport failed
You can use sqren/backport to manually backport by running |
This reworks the way
FieldExtractorIT
requests fields to be loaded. Previously it used pragmas and would skip itself if it wasn't a unit test. This removes that behavior and sends pragmas but also sends theaccept_pragma_risks
option which is used in production releases to allow pragmas - it's especially useful for testing. This should make the tests more consistent.Closes #127100