mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fixes https://github.com/elastic/kibana/issues/155409 https://github.com/elastic/kibana/pull/152516 incorrectly attempted to resolve https://github.com/elastic/kibana/issues/151221. https://github.com/elastic/kibana/pull/152516 updated shouldFetch$ to only check searchSessionId to determine if re-fetching is required. This logic did not work when custom time ranges are applied to panels since custom time ranges do not require new search session id yet the time range changed. This PR reverts shouldFetch$ logic of only checking searchSessionId to determine if re-fetching is required. Instead, this PR moves searchSessionId out of input and into dashboard instance state. That way, `input` updates, such as query, do not trigger additional `input` updates. The PR also updates seachSessionId logic from async to sync so that dashboard can update seachSessionId on input changes prior to child embeddables updating to parent input changes. This avoids the double fetch and allows children to only have a single input update on query state change. There was a functional test, panel_time_range, that should have caught the regression but that test had a bug in it. The assertion that the custom time range was applied looked like `expect(await testSubjects.exists('emptyPlaceholder'))` which will never fail the test because the last part of the expect is missing. Instead, the statements should be `expect(await testSubjects.exists('emptyPlaceholder')).to.be(true)`. These updates to the functional test would have caught the regression (I verified this by making these changes on main and running the test. They do indeed fail). --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: nreese <reese.nathan@elastic.co> |
||
---|---|---|
.. | ||
cli | ||
cli_encryption_keys | ||
cli_health_gateway | ||
cli_keystore | ||
cli_plugin | ||
cli_setup | ||
cli_verification_code | ||
core | ||
dev | ||
plugins | ||
setup_node_env |