[ES|QL] Fixes lookup indexes route failures on read permissions#233282
[ES|QL] Fixes lookup indexes route failures on read permissions#233282stratoula merged 3 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-esql (Team:ESQL) |
💚 Build Succeeded
Metrics [docs]Async chunks
|
drewdaemon
left a comment
There was a problem hiding this comment.
Code changes make sense to me!
|
Starting backport for target branches: 8.19 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…tic#233282) ## Summary This PR is fixing a bunch of bugs all related with lookup join route. When you are on an instance with read privileges on indexes and try to use the ES|QL editor you will see 2 problems: 1. The lookup join route fails with 500 2. The failure makes the history component to not save anything at the local storage. The reason is that our validation api fails so we cant get the status so the item is not saved at the local storage After an investigation I found out that: - client.indices.getSettings fails when you have read priviliges - the client.indices.getAlias fails if you pass an empty array What I did: - changed the client.indices.getSettings to client.indices.resolveIndex which works on read and doesnt return hidden indices - I am fetching the aliases from the same api - I added the parseMessages to a try catch loop to be sure that even if something fails on the validation the history component will work (cherry picked from commit 3adac4b) # Conflicts: # src/platform/plugins/shared/esql/server/services/esql_service.ts
…tic#233282) ## Summary This PR is fixing a bunch of bugs all related with lookup join route. When you are on an instance with read privileges on indexes and try to use the ES|QL editor you will see 2 problems: 1. The lookup join route fails with 500 2. The failure makes the history component to not save anything at the local storage. The reason is that our validation api fails so we cant get the status so the item is not saved at the local storage After an investigation I found out that: - client.indices.getSettings fails when you have read priviliges - the client.indices.getAlias fails if you pass an empty array What I did: - changed the client.indices.getSettings to client.indices.resolveIndex which works on read and doesnt return hidden indices - I am fetching the aliases from the same api - I added the parseMessages to a try catch loop to be sure that even if something fails on the validation the history component will work
…tic#233282) ## Summary This PR is fixing a bunch of bugs all related with lookup join route. When you are on an instance with read privileges on indexes and try to use the ES|QL editor you will see 2 problems: 1. The lookup join route fails with 500 2. The failure makes the history component to not save anything at the local storage. The reason is that our validation api fails so we cant get the status so the item is not saved at the local storage After an investigation I found out that: - client.indices.getSettings fails when you have read priviliges - the client.indices.getAlias fails if you pass an empty array What I did: - changed the client.indices.getSettings to client.indices.resolveIndex which works on read and doesnt return hidden indices - I am fetching the aliases from the same api - I added the parseMessages to a try catch loop to be sure that even if something fails on the validation the history component will work
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
|
Backported a part of it here #233949 |
Summary
This PR is fixing a bunch of bugs all related with lookup join route.
When you are on an instance with read privileges on indexes and try to use the ES|QL editor you will see 2 problems:
After an investigation I found out that:
What I did: