-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ES|QL: Check if cluster aliases and index patterns are valid before executing query #122497
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
Merged
pawankartik-elastic
merged 28 commits into
elastic:main
from
pawankartik-elastic:pkar/index-pattern-check
Jun 25, 2025
Merged
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8f324ae
Check if index patterns conform to valid format before validation
pawankartik-elastic 1ddbce4
Update docs/changelog/122497.yaml
pawankartik-elastic 46758cb
Let `validateClusterString()` look for `REMOTE_CLUSTER_INDEX_SEPARATOR`
pawankartik-elastic 2f2ee85
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 7ca6d70
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 9dd96df
Mute 3 cases till further clarification and fix error string message
pawankartik-elastic 0686c8f
Fix tests
pawankartik-elastic 7c55d6c
Fix bug in breaking down indices
pawankartik-elastic 2653377
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 5832ff0
Tiny refactoring around how wildcard is processed and added tests
pawankartik-elastic 6cdbf5a
[CI] Auto commit changes from spotless
c2160bb
Drop duplicated test cases and fix flaky-ness caused by quoting
pawankartik-elastic 544171b
Set cluster string to `null` when it cannot be associated with an index
pawankartik-elastic 133a7c7
Generate correct invalid patterns
pawankartik-elastic 7da29d8
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 5c70d51
Address review comments and don't break indices into its constituents
pawankartik-elastic 7ad6ac3
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 3058610
Adhere to the new grammar
pawankartik-elastic 376126e
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 1a43029
Update docs/changelog/122497.yaml
pawankartik-elastic 8363b70
Update x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/…
pawankartik-elastic 9c16afb
Apply suggestions from review
pawankartik-elastic 8f9f519
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic b6339e7
Apply suggestions from code review
pawankartik-elastic 0cc5580
Apply suggestions from review
pawankartik-elastic 816fcc1
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic 0346762
Do not mention asterisk as an invalid char
pawankartik-elastic 9d275a5
Merge branch 'main' into pkar/index-pattern-check
pawankartik-elastic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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: 122497 | ||
| summary: Check if index patterns conform to valid format before validation | ||
| area: CCS | ||
| type: bug | ||
| issues: [] |
This file contains hidden or 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
pawankartik-elastic marked this conversation as resolved.
Show resolved
Hide resolved
pawankartik-elastic marked this conversation as resolved.
Show resolved
Hide resolved
pawankartik-elastic marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 currently permits white spaces between separators and index name, like
FROM "remote : idx"andFROM idx :: failures; it fails with less helpful error messages later down the line.I think this is related to #129768, but not exactly the same. To avoid scope creep, we can tackle this in a follow-up or make it part of the other issue. I added a comment #129768 (comment) so we don't forget.