Skip to content

Conversation

alex-spies
Copy link
Contributor

Fix #132273

Our generative tests skip some faulty queries based on the returned error message.

The error message can sometimes be split into multiple lines with backslashes marking the line boundaries, like in the following example:

error: root_cause: - type: "illegal_state_exception" reason: "Found 1 problem\nline 1:960: Plan [Grok[message{r}#72141,Parser[pattern=%{WORD:wuHEnnQxDWJ}\ \ %{WORD:language_code_long} %{WORD:color}, grok=org.elastics\nearch.grok.Grok@2a38e4e2],[color{r}#72147,\ \ language_code_long{r}#72148, wuHEnnQxDWJ{r}#72149]]] optimized incorrectly\ \ due to missing references [message{r}#72141]" stack_trace: "org.elasticsearch.ElasticsearchException$1: Found 1 problem\nline\ \ 1:960: Plan [Grok[message{r}#72141,Parser[pattern=%{WORD:wuHEnnQxDWJ} %{WORD:language_code_long}\ \ %{WORD:color}, grok=org.elastics\nearch.grok.Grok@2a38e4e2],[color{r}#72147,\ \ language_code_long{r}#72148, wuHEnnQxDWJ{r}#72149]]] optimized incorrectly\ \ due to missing references [message{r}#72141]\r\n\tat org.elasticsea 

This should have been skipped based on the string optimized incorrectly due to missing references, but this skip was prevented because this string was split across multiple lines.

Let's stitch the error message back together before we check if it should be ignored, so that such line splits don't prevent skips.

@alex-spies alex-spies added >test Issues or PRs that are addressing/adding tests auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.2.0 v9.1.1 v8.19.1 labels Aug 4, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Aug 4, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

The error message can sometimes be split into multiple lines with backslashes marking the line boundaries. Let's make our skips work even in case of overlong lines.
@alex-spies alex-spies force-pushed the fix-gen-test-skipping branch from d052ccb to ab2b331 Compare August 4, 2025 11:10
@alex-spies alex-spies merged commit ccfbf49 into elastic:main Aug 4, 2025
33 checks passed
@alex-spies alex-spies deleted the fix-gen-test-skipping branch August 4, 2025 15:00
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 132390

alex-spies added a commit to alex-spies/elasticsearch that referenced this pull request Aug 5, 2025
The error message can sometimes be split into multiple lines with backslashes marking the line boundaries. Let's make our skips work even in case of overlong lines. (cherry picked from commit ccfbf49) # Conflicts: #	muted-tests.yml
@alex-spies
Copy link
Contributor Author

💔 Some backports could not be created

Status Branch Result
9.1
8.19 Conflict resolution was aborted by the user

Manual backport

To create the backport manually run:

backport --pr 132390 

Questions ?

Please refer to the Backport tool documentation

@alex-spies alex-spies removed the v8.19.1 label Aug 5, 2025
@alex-spies
Copy link
Contributor Author

The generative tests on 9.1 are ahead of those on 8.19. Won't backport to 8.19 as this would create a mess.

elasticsearchmachine pushed a commit that referenced this pull request Aug 5, 2025
The error message can sometimes be split into multiple lines with backslashes marking the line boundaries. Let's make our skips work even in case of overlong lines. (cherry picked from commit ccfbf49) # Conflicts: #	muted-tests.yml
szybia added a commit to szybia/elasticsearch that referenced this pull request Aug 5, 2025
…cking * upstream/main: (26 commits) [Fleet] add privileges to `kibana_system` to read integrations data (elastic#132400) Add `TestEntitlementsRule` with support for dynamic entitled node paths for testing (elastic#132077) Reduce logging frequency for GCS per project clients (elastic#132429) Skip update/100_synthetic_source tests in yamlRestCompatTests (elastic#132296) Correct exception for missing nested path (elastic#132408) Fixing esql release tests elastic#132369 (elastic#132406) Adjust date docvalue formatting to return 4xx instead of 5xx (elastic#132414) Handle nested fields with the termvectors REST API in artificial docs (elastic#92568) Only collect bulk scored vectors when exceeding min competitive (elastic#132293) Fix release tests diskbbq update (elastic#132405) ESQL: Fix skipping of generative tests (elastic#132390) Short circuit failure handling in OIDC flow (elastic#130618) Small optimization in OptimizedScalarQuantizer by using mul instead of div (elastic#132397) Aggs: Add validation to Bucket script pipeline agg (elastic#132320) ESQL: Multiple parameters in ungrouped aggs (elastic#132375) ESQL: Explain test operators (elastic#132374) EQL: Deal with internally created IN in a different way for EQL (elastic#132167) Speed up hierarchical k-means by computing distances in bulk (elastic#132384) Reduce the number of fields per document (elastic#132322) Assert current thread in ESQL (elastic#132324) ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.1.1 v9.2.0

4 participants