Skip to content

[8.19] [ES|QL] Fixes lookup indexes route failures on read permissions (#233282)#233499

Closed
stratoula wants to merge 2 commits intoelastic:8.19from
stratoula:backport/8.19/pr-233282
Closed

[8.19] [ES|QL] Fixes lookup indexes route failures on read permissions (#233282)#233499
stratoula wants to merge 2 commits intoelastic:8.19from
stratoula:backport/8.19/pr-233282

Conversation

@stratoula
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

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
@stratoula stratoula added the backport This PR is a backport of another PR label Aug 29, 2025
@stratoula stratoula enabled auto-merge (squash) August 29, 2025 13:55
@stratoula
Copy link
Contributor Author

The api is different in 8.19 so I cant backport this bug fix

@stratoula stratoula closed this Sep 4, 2025
auto-merge was automatically disabled September 4, 2025 06:53

Pull request was closed

@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 4, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #4 / EsqlService can load ES|QL Autocomplete/Validation indices for JOIN command
  • [job] [logs] Jest Integration Tests #4 / EsqlService can load ES|QL Autocomplete/Validation indices for JOIN command
  • [job] [logs] Jest Integration Tests #4 / EsqlService can load ES|QL Autocomplete/Validation indices for TS command
  • [job] [logs] Jest Integration Tests #4 / EsqlService can load ES|QL Autocomplete/Validation indices for TS command

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
esql 257.7KB 257.7KB +54.0B

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants