Skip to content

Conversation

@kertal
Copy link
Member

@kertal kertal commented Nov 23, 2020

Summary

On a dashboard a saved search submitted 2 requests when timerange, filter or query was changed. This happened because prevFilters, prevQuery, prevTimeRange were set after the fetch function was executed

this.fetch();
this.prevFilters = this.input.filters;
this.prevQuery = this.input.query;
this.prevTimeRange = this.input.timeRange;

The fetch function was adapted in #68623 to set the loading state:

this.updateOutput({ loading: true, error: undefined });

Because of this pushContainerStateParamsToScope was executed again, isFetchRequired returned true, since prevFilters, prevQuery, prevTimeRange were not updated.

};
private pushContainerStateParamsToScope(searchScope: SearchScope) {
const isFetchRequired =
!esFilters.onlyDisabledFiltersChanged(this.input.filters, this.prevFilters) ||
!_.isEqual(this.prevQuery, this.input.query) ||

And this was the reason for the 2nd request of data.

This PR fixes this race condition by setting the previous values:

this.prevFilters = this.input.filters; 
this.prevQuery = this.input.query; 
this.prevTimeRange = this.input.timeRange;

before the execution of fetch, so isFetchRequired returns false, no more double request.

Fixes #82110

Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials
- [ ] Unit or functional tests were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
- [ ] This was checked for cross-browser compatibility

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately

@kertal kertal self-assigned this Nov 23, 2020
@kertal kertal added Feature:Discover Discover Application Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// labels Nov 23, 2020
@kertal kertal marked this pull request as ready for review November 30, 2020 12:39
@kertal kertal requested a review from a team November 30, 2020 12:39
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@kertal kertal changed the title [Discover] Fix redundant fetching of saved search embeddable on time range change [Discover] Fix double fetching of saved search embeddable Nov 30, 2020
@kertal
Copy link
Member Author

kertal commented Nov 30, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts.alerting api integration security and spaces enabled Alerts alerts "before all" hook in "alerts"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 4 times on tracked branches: https://github.com/elastic/kibana/issues/80293

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg creating space
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.ds-ilm-history-5-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:00]             │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-000001] and backing indices []
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ds-ilm-history-5-000001][0]]])." previous.health="YELLOW" reason="shards started [[.ds-ilm-history-5-000001][0]]"
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:01]             │ debg created space
[00:00:01]             │ debg creating space
[00:00:02]             │ debg created space
[00:00:02]             │ debg creating space
[00:00:03]             │ debg created space
[00:00:03]             │ debg creating user no_kibana_privileges
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [no_kibana_privileges]
[00:00:03]             │ debg created user no_kibana_privileges
[00:00:03]             │ debg creating role no_kibana_privileges
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [no_kibana_privileges]
[00:00:03]             │ debg creating user superuser
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [superuser]
[00:00:03]             │ debg created user superuser
[00:00:03]             │ debg creating user global_read
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [global_read]
[00:00:03]             │ debg created user global_read
[00:00:03]             │ debg creating role global_read_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [global_read_role]
[00:00:03]             │ debg creating user space_1_all
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all]
[00:00:03]             │ debg created user space_1_all
[00:00:03]             │ debg creating role space_1_all_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_role]
[00:00:03]             │ debg creating user space_1_all_with_restricted_fixture
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all_with_restricted_fixture]
[00:00:04]             │ debg created user space_1_all_with_restricted_fixture
[00:00:04]             │ debg creating role space_1_all_with_restricted_fixture_role
[00:00:04]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_with_restricted_fixture_role]
[00:00:04]             │ debg creating user space_1_all_alerts_none_actions
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all_alerts_none_actions]
[00:00:04]             │ debg created user space_1_all_alerts_none_actions
[00:00:04]             │ debg creating role space_1_all_alerts_none_actions_role
[00:00:04]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_alerts_none_actions_role]
[00:04:00]           └-: Alerts
[00:04:00]             └-> "before all" hook
[00:34:58]             └-: alerts
[00:34:58]               └-> "before all" hook
[00:34:58]               └-> "before all" hook
[00:34:58]                 │ info [alerts_legacy] Loading "mappings.json"
[00:34:58]                 │ info [alerts_legacy] Loading "data.json"
[00:34:58]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_1/X6Ol5PupQiuXNFb4u1hoEw] deleting index
[00:34:59]                 │ info [alerts_legacy] Deleted existing index [".kibana_1"]
[00:34:59]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:34:59]                 │ proc [kibana]   log   [14:32:22.128] [info][eventLog][plugins] event logged: {"@timestamp":"2020-11-30T14:32:22.124Z","event":{"provider":"alerting","action":"execute","start":"2020-11-30T14:32:22.124Z","end":"2020-11-30T14:32:22.127Z","duration":3000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"08820c93-2bc5-4a3e-a42a-4725a5187e42","namespace":"space2"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/08820c93-2bc5-4a3e-a42a-4725a5187e42] not found"},"message":"test.noop:08820c93-2bc5-4a3e-a42a-4725a5187e42: execution failed","ecs":{"version":"1.6.0"}}
[00:34:59]                 │ proc [kibana]   log   [14:32:22.131] [error][plugins][taskManager] Task alerting:test.noop "7c09d100-3315-11eb-b9cb-bb7bdf554b80" failed: Error: Saved object [alert/08820c93-2bc5-4a3e-a42a-4725a5187e42] not found
[00:34:59]                 │ info [alerts_legacy] Created index ".kibana_1"
[00:34:59]                 │ debg [alerts_legacy] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:34:59]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_task_manager_1/3zSbpHp6Tdme3ZCKZHvwaA] deleting index
[00:34:59]                 │ info [alerts_legacy] Deleted existing index ".kibana_task_manager_1"
[00:34:59]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_task_manager] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:34:59]                 │ info failed to create aliases [{ '.kibana_task_manager': {} }] because ES indicated an index/alias already exists, trying again
[00:34:59]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_1/Glx9t8oNTyKiNUD8-mxQbA] deleting index
[00:34:59]                 │ info [alerts_legacy] Deleted existing index [".kibana_1"]
[00:34:59]                 └- ✖ fail: alerting api integration security and spaces enabled Alerts alerts "before all" hook in "alerts"
[00:34:59]                 │      Error: [invalid_alias_name_exception] Invalid alias name [.kibana_task_manager], an index exists with the same name as the alias, with { index_uuid="uYFrJkHdR-G2kHoUVScLMA" & index=".kibana_task_manager" }
[00:34:59]                 │       at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:34:59]                 │       at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:34:59]                 │       at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:34:59]                 │       at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
[00:34:59]                 │       at endReadableNT (_stream_readable.js:1223:12)
[00:34:59]                 │       at processTicksAndRejections (internal/process/task_queues.js:84:21)
[00:34:59]                 │ 
[00:34:59]                 │ 

Stack Trace

StatusCodeError: [invalid_alias_name_exception] Invalid alias name [.kibana_task_manager], an index exists with the same name as the alias, with { index_uuid="uYFrJkHdR-G2kHoUVScLMA" & index=".kibana_task_manager" }
    at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
    at endReadableNT (_stream_readable.js:1223:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  status: 400,
  displayName: 'BadRequest',
  path: '/.kibana_task_manager_1',
  query: {},
  body: {
    error: {
      root_cause: [Array],
      type: 'invalid_alias_name_exception',
      reason: 'Invalid alias name [.kibana_task_manager], an index exists with the same name as the alias',
      index_uuid: 'uYFrJkHdR-G2kHoUVScLMA',
      index: '.kibana_task_manager'
    },
    status: 400
  },
  statusCode: 400,
  response: '{"error":{"root_cause":[{"type":"invalid_alias_name_exception","reason":"Invalid alias name [.kibana_task_manager], an index exists with the same name as the alias","index_uuid":"uYFrJkHdR-G2kHoUVScLMA","index":".kibana_task_manager"}],"type":"invalid_alias_name_exception","reason":"Invalid alias name [.kibana_task_manager], an index exists with the same name as the alias","index_uuid":"uYFrJkHdR-G2kHoUVScLMA","index":".kibana_task_manager"},"status":400}',
  toString: [Function],
  toJSON: [Function]
}

X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts.alerting api integration security and spaces enabled Alerts alerts "after all" hook in "alerts"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 4 times on tracked branches: https://github.com/elastic/kibana/issues/80294

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg creating space
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.ds-ilm-history-5-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:00]             │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-000001] and backing indices []
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ds-ilm-history-5-000001][0]]])." previous.health="YELLOW" reason="shards started [[.ds-ilm-history-5-000001][0]]"
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:01]             │ debg created space
[00:00:01]             │ debg creating space
[00:00:02]             │ debg created space
[00:00:02]             │ debg creating space
[00:00:03]             │ debg created space
[00:00:03]             │ debg creating user no_kibana_privileges
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [no_kibana_privileges]
[00:00:03]             │ debg created user no_kibana_privileges
[00:00:03]             │ debg creating role no_kibana_privileges
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [no_kibana_privileges]
[00:00:03]             │ debg creating user superuser
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [superuser]
[00:00:03]             │ debg created user superuser
[00:00:03]             │ debg creating user global_read
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [global_read]
[00:00:03]             │ debg created user global_read
[00:00:03]             │ debg creating role global_read_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [global_read_role]
[00:00:03]             │ debg creating user space_1_all
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all]
[00:00:03]             │ debg created user space_1_all
[00:00:03]             │ debg creating role space_1_all_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_role]
[00:00:03]             │ debg creating user space_1_all_with_restricted_fixture
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all_with_restricted_fixture]
[00:00:04]             │ debg created user space_1_all_with_restricted_fixture
[00:00:04]             │ debg creating role space_1_all_with_restricted_fixture_role
[00:00:04]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_with_restricted_fixture_role]
[00:00:04]             │ debg creating user space_1_all_alerts_none_actions
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all_alerts_none_actions]
[00:00:04]             │ debg created user space_1_all_alerts_none_actions
[00:00:04]             │ debg creating role space_1_all_alerts_none_actions_role
[00:00:04]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_alerts_none_actions_role]
[00:04:00]           └-: Alerts
[00:04:00]             └-> "before all" hook
[00:34:58]             └-: alerts
[00:34:58]               └-> "before all" hook
[00:34:58]               └-> "before all" hook
[00:34:58]                 │ info [alerts_legacy] Loading "mappings.json"
[00:34:58]                 │ info [alerts_legacy] Loading "data.json"
[00:34:58]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_1/X6Ol5PupQiuXNFb4u1hoEw] deleting index
[00:34:59]                 │ info [alerts_legacy] Deleted existing index [".kibana_1"]
[00:34:59]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:34:59]                 │ proc [kibana]   log   [14:32:22.128] [info][eventLog][plugins] event logged: {"@timestamp":"2020-11-30T14:32:22.124Z","event":{"provider":"alerting","action":"execute","start":"2020-11-30T14:32:22.124Z","end":"2020-11-30T14:32:22.127Z","duration":3000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"08820c93-2bc5-4a3e-a42a-4725a5187e42","namespace":"space2"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/08820c93-2bc5-4a3e-a42a-4725a5187e42] not found"},"message":"test.noop:08820c93-2bc5-4a3e-a42a-4725a5187e42: execution failed","ecs":{"version":"1.6.0"}}
[00:34:59]                 │ proc [kibana]   log   [14:32:22.131] [error][plugins][taskManager] Task alerting:test.noop "7c09d100-3315-11eb-b9cb-bb7bdf554b80" failed: Error: Saved object [alert/08820c93-2bc5-4a3e-a42a-4725a5187e42] not found
[00:34:59]                 │ info [alerts_legacy] Created index ".kibana_1"
[00:34:59]                 │ debg [alerts_legacy] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:34:59]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_task_manager_1/3zSbpHp6Tdme3ZCKZHvwaA] deleting index
[00:34:59]                 │ info [alerts_legacy] Deleted existing index ".kibana_task_manager_1"
[00:34:59]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_task_manager] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:34:59]                 │ info failed to create aliases [{ '.kibana_task_manager': {} }] because ES indicated an index/alias already exists, trying again
[00:34:59]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.kibana_1/Glx9t8oNTyKiNUD8-mxQbA] deleting index
[00:34:59]                 │ info [alerts_legacy] Deleted existing index [".kibana_1"]
[00:34:59]                 └- ✖ fail: alerting api integration security and spaces enabled Alerts alerts "before all" hook in "alerts"
[00:34:59]                 │      Error: [invalid_alias_name_exception] Invalid alias name [.kibana_task_manager], an index exists with the same name as the alias, with { index_uuid="uYFrJkHdR-G2kHoUVScLMA" & index=".kibana_task_manager" }
[00:34:59]                 │       at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:34:59]                 │       at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:34:59]                 │       at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:34:59]                 │       at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
[00:34:59]                 │       at endReadableNT (_stream_readable.js:1223:12)
[00:34:59]                 │       at processTicksAndRejections (internal/process/task_queues.js:84:21)
[00:34:59]                 │ 
[00:34:59]                 │ 
[00:34:59]                 └-> "after all" hook
[00:34:59]                   └- ✖ fail: alerting api integration security and spaces enabled Alerts alerts "after all" hook in "alerts"
[00:34:59]                   │      Error: [index_not_found_exception] no such index [.kibana-test-authorization], with { resource.type="index_or_alias" & resource.id=".kibana-test-authorization" & index_uuid="_na_" & index=".kibana-test-authorization" }
[00:34:59]                   │       at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:34:59]                   │       at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:34:59]                   │       at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:34:59]                   │       at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
[00:34:59]                   │       at endReadableNT (_stream_readable.js:1223:12)
[00:34:59]                   │       at processTicksAndRejections (internal/process/task_queues.js:84:21)
[00:34:59]                   │ 
[00:34:59]                   │ 

Stack Trace

StatusCodeError: [index_not_found_exception] no such index [.kibana-test-authorization], with { resource.type="index_or_alias" & resource.id=".kibana-test-authorization" & index_uuid="_na_" & index=".kibana-test-authorization" }
    at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
    at endReadableNT (_stream_readable.js:1223:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  status: 404,
  displayName: 'NotFound',
  path: '/.kibana-test-authorization',
  query: {},
  body: {
    error: {
      root_cause: [Array],
      type: 'index_not_found_exception',
      reason: 'no such index [.kibana-test-authorization]',
      'resource.type': 'index_or_alias',
      'resource.id': '.kibana-test-authorization',
      index_uuid: '_na_',
      index: '.kibana-test-authorization'
    },
    status: 404
  },
  statusCode: 404,
  response: '{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [.kibana-test-authorization]","resource.type":"index_or_alias","resource.id":".kibana-test-authorization","index_uuid":"_na_","index":".kibana-test-authorization"}],"type":"index_not_found_exception","reason":"no such index [.kibana-test-authorization]","resource.type":"index_or_alias","resource.id":".kibana-test-authorization","index_uuid":"_na_","index":".kibana-test-authorization"},"status":404}',
  toString: [Function],
  toJSON: [Function]
}

X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/index·ts.alerting api integration security and spaces enabled "after all" hook in "alerting api integration security and spaces enabled"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/59418

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg creating space
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] [.ds-ilm-history-5-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:00]             │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-000001] and backing indices []
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ds-ilm-history-5-000001][0]]])." previous.health="YELLOW" reason="shards started [[.ds-ilm-history-5-000001][0]]"
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] moving index [.ds-ilm-history-5-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:01]             │ debg created space
[00:00:01]             │ debg creating space
[00:00:02]             │ debg created space
[00:00:02]             │ debg creating space
[00:00:03]             │ debg created space
[00:00:03]             │ debg creating user no_kibana_privileges
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [no_kibana_privileges]
[00:00:03]             │ debg created user no_kibana_privileges
[00:00:03]             │ debg creating role no_kibana_privileges
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [no_kibana_privileges]
[00:00:03]             │ debg creating user superuser
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [superuser]
[00:00:03]             │ debg created user superuser
[00:00:03]             │ debg creating user global_read
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [global_read]
[00:00:03]             │ debg created user global_read
[00:00:03]             │ debg creating role global_read_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [global_read_role]
[00:00:03]             │ debg creating user space_1_all
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all]
[00:00:03]             │ debg created user space_1_all
[00:00:03]             │ debg creating role space_1_all_role
[00:00:03]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_role]
[00:00:03]             │ debg creating user space_1_all_with_restricted_fixture
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all_with_restricted_fixture]
[00:00:04]             │ debg created user space_1_all_with_restricted_fixture
[00:00:04]             │ debg creating role space_1_all_with_restricted_fixture_role
[00:00:04]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_with_restricted_fixture_role]
[00:00:04]             │ debg creating user space_1_all_alerts_none_actions
[00:00:04]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added user [space_1_all_alerts_none_actions]
[00:00:04]             │ debg created user space_1_all_alerts_none_actions
[00:00:04]             │ debg creating role space_1_all_alerts_none_actions_role
[00:00:04]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1606742485612141587] added role [space_1_all_alerts_none_actions_role]
[00:34:59]               └-> "after all" hook
[00:34:59]                 │ debg deleting user no_kibana_privileges
[00:34:59]                 │ debg deleted user no_kibana_privileges
[00:34:59]                 │ debg deleting role no_kibana_privileges
[00:34:59]                 │ debg deleting user superuser
[00:34:59]                 │ debg deleted user superuser
[00:34:59]                 │ debg deleting user global_read
[00:34:59]                 │ debg deleted user global_read
[00:34:59]                 │ debg deleting role global_read_role
[00:34:59]                 │ debg deleting user space_1_all
[00:34:59]                 │ debg deleted user space_1_all
[00:34:59]                 │ debg deleting role space_1_all_role
[00:34:59]                 │ debg deleting user space_1_all_with_restricted_fixture
[00:34:59]                 │ debg deleted user space_1_all_with_restricted_fixture
[00:34:59]                 │ debg deleting role space_1_all_with_restricted_fixture_role
[00:34:59]                 │ debg deleting user space_1_all_alerts_none_actions
[00:34:59]                 │ debg deleted user space_1_all_alerts_none_actions
[00:34:59]                 │ debg deleting role space_1_all_alerts_none_actions_role
[00:34:59]                 │ info [empty_kibana] Unloading indices from "mappings.json"
[00:34:59]                 └- ✖ fail: alerting api integration security and spaces enabled "after all" hook in "alerting api integration security and spaces enabled"
[00:34:59]                 │      Error: [index_not_found_exception] no such index [.kibana], with { resource.type="index_or_alias" & resource.id=".kibana" & index_uuid="_na_" & index=".kibana" }
[00:34:59]                 │       at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:34:59]                 │       at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:34:59]                 │       at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:34:59]                 │       at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
[00:34:59]                 │       at endReadableNT (_stream_readable.js:1223:12)
[00:34:59]                 │       at processTicksAndRejections (internal/process/task_queues.js:84:21)
[00:34:59]                 │ 
[00:34:59]                 │ 

Stack Trace

StatusCodeError: [index_not_found_exception] no such index [.kibana], with { resource.type="index_or_alias" & resource.id=".kibana" & index_uuid="_na_" & index=".kibana" }
    at respond (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:349:15)
    at checkRespForFailure (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/transport.js:306:7)
    at HttpConnector.<anonymous> (/dev/shm/workspace/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
    at IncomingMessage.wrapper (/dev/shm/workspace/kibana/node_modules/lodash/lodash.js:4949:19)
    at endReadableNT (_stream_readable.js:1223:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  status: 404,
  displayName: 'NotFound',
  path: '/.kibana/_delete_by_query',
  query: {},
  body: {
    error: {
      root_cause: [Array],
      type: 'index_not_found_exception',
      reason: 'no such index [.kibana]',
      'resource.type': 'index_or_alias',
      'resource.id': '.kibana',
      index_uuid: '_na_',
      index: '.kibana'
    },
    status: 404
  },
  statusCode: 404,
  response: '{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [.kibana]","resource.type":"index_or_alias","resource.id":".kibana","index_uuid":"_na_","index":".kibana"}],"type":"index_not_found_exception","reason":"no such index [.kibana]","resource.type":"index_or_alias","resource.id":".kibana","index_uuid":"_na_","index":".kibana"},"status":404}',
  toString: [Function],
  toJSON: [Function]
}

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Chrome, works as expected, LGTM

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 3, 2020
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

3 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kertal kertal removed the v7.10.1 label Dec 14, 2020
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Discover Discover Application release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saved search embeddable fetches twice on time range change

4 participants