elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.67k stars 8.23k forks source link

[ResponseOps][Rules] Race condition in ESQuery rule data view selector #198502

Open umbopepato opened 3 weeks ago

umbopepato commented 3 weeks ago

The ESQuery rule's data view selector shows an empty list if the data views service hasn't finished refreshing the saved objects cache before the component is rendered.

To reproduce

  1. Add a delay after this call https://github.com/elastic/kibana/blob/760455a0ff995597cefb45e7b1aa1bfbd251b4eb/src/plugins/data_views/common/data_views/data_views.ts#L399
    await new Promise((r) => setTimeout(r, 5000));
  2. Reload the Kibana tab
  3. Navigate to Observability > Alerts > Manage rules > Create rule
  4. Select Elasticsearch Query
  5. Select KQL as query type
  6. Open the Data View selector, it should be empty

Image

elasticmachine commented 3 weeks ago

Pinging @elastic/response-ops (Team:ResponseOps)