Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Discover] Add caused_by.type and caused_by.reason to error toast modal (#70404) #71595

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

kertal
Copy link
Member

@kertal kertal commented Jul 14, 2020

Backports the following commits to 7.x:

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Plugin Functional Tests.x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration·js.task_manager scheduling and running tasks should return a task run error result when trying to run a task now which is already running

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: task_manager
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: scheduling and running tasks
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> should support middleware
[00:00:00]               └-> "before each" hook: global before each
[00:00:00]               └-> "before each" hook
[00:00:00]               └-> "before each" hook
[00:00:00]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594705637232005603] [.kibana_task_manager_test_result] creating index, cause [api], templates [], shards [1]/[1]
[00:00:00]               │ debg Task created: 6f9c2f00-c59f-11ea-8601-2d16149f36af
[00:00:00]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:00]               │ proc [kibana]   log   [06:58:35.326] [warning][plugins][reporting] Enabling the Chromium sandbox provides an additional layer of protection.
[00:00:00]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594705637232005603] [ilm-history-2-000001] creating index, cause [api], templates [ilm-history], shards [1]/[0]
[00:00:00]               │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-debian-tests-xl-1594705637232005603] moving index [ilm-history-2-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]               │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-debian-tests-xl-1594705637232005603] moving index [ilm-history-2-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-debian-tests-xl-1594705637232005603] moving index [ilm-history-2-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:00]               │ debg --- retry.try failed again with the same message...
[00:00:01]               │ debg --- retry.try failed again with the same message...
[00:00:01]               │ debg --- retry.try failed again with the same message...
[00:00:02]               │ debg --- retry.try failed again with the same message...
[00:00:02]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594705637232005603] [.kibana_task_manager_test_result/VY0DEq_JQbOjAgcNdbv-_g] update_mapping [_doc]
[00:00:02]               │ debg Task found: 6f9c2f00-c59f-11ea-8601-2d16149f36af
[00:00:02]               │ debg Task status: claiming
[00:00:02]               │ debg Task state: {}
[00:00:02]               │ debg Task params: {
[00:00:02]               │        "originalParams": {
[00:00:02]               │          "historyItem": 72
[00:00:02]               │        },
[00:00:02]               │        "superFly": "My middleware param!"
[00:00:02]               │      }
[00:00:02]               │ debg --- retry.try error: expected undefined to sort of equal 1
[00:00:03]               │ debg Task found: 6f9c2f00-c59f-11ea-8601-2d16149f36af
[00:00:03]               │ debg Task status: claiming
[00:00:03]               │ debg Task state: {}
[00:00:03]               │ debg Task params: {
[00:00:03]               │        "originalParams": {
[00:00:03]               │          "historyItem": 72
[00:00:03]               │        },
[00:00:03]               │        "superFly": "My middleware param!"
[00:00:03]               │      }
[00:00:03]               │ debg --- retry.try failed again with the same message...
[00:00:03]               │ debg Task found: 6f9c2f00-c59f-11ea-8601-2d16149f36af
[00:00:03]               │ debg Task status: idle
[00:00:03]               │ debg Task state: {
[00:00:03]               │        "count": 1
[00:00:03]               │      }
[00:00:03]               │ debg Task params: {
[00:00:03]               │        "originalParams": {
[00:00:03]               │          "historyItem": 72
[00:00:03]               │        },
[00:00:03]               │        "superFly": "My middleware param!"
[00:00:03]               │      }
[00:00:03]               └- ✓ pass  (3.7s) "task_manager scheduling and running tasks should support middleware"
[00:00:03]             └-> should remove non-recurring tasks after they complete
[00:00:03]               └-> "before each" hook: global before each
[00:00:03]               └-> "before each" hook
[00:00:04]               └-> "before each" hook
[00:00:04]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:05]               │ debg --- retry.try failed again with the same message...
[00:00:05]               │ debg --- retry.try failed again with the same message...
[00:00:06]               │ debg --- retry.try error: expected [ { taskType: 'sampleTask',
[00:00:06]               │          retryAt: '2020-07-14T06:59:10.496Z',
[00:00:06]               │          runAt: '2020-07-14T06:58:39.463Z',
[00:00:06]               │          scope: [ 'testing' ],
[00:00:06]               │          startedAt: null,
[00:00:06]               │          state: {},
[00:00:06]               │          params: 
[00:00:06]               │           { originalParams: {},
[00:00:06]               │             superFly: 'My middleware param!' },
[00:00:06]               │          ownerId: 'kibana:5b2de169-2785-441b-ae8c-186a1936b17d',
[00:00:06]               │          scheduledAt: '2020-07-14T06:58:39.463Z',
[00:00:06]               │          attempts: 0,
[00:00:06]               │          status: 'claiming',
[00:00:06]               │          id: '7232df70-c59f-11ea-8601-2d16149f36af' } ] to sort of equal []
[00:00:07]               └- ✓ pass  (2.5s) "task_manager scheduling and running tasks should remove non-recurring tasks after they complete"
[00:00:07]             └-> should use a given ID as the task document ID
[00:00:07]               └-> "before each" hook: global before each
[00:00:07]               └-> "before each" hook
[00:00:07]               └-> "before each" hook
[00:00:07]               └- ✓ pass  (18ms) "task_manager scheduling and running tasks should use a given ID as the task document ID"
[00:00:07]             └-> should allow a task with a given ID to be scheduled multiple times
[00:00:07]               └-> "before each" hook: global before each
[00:00:07]               └-> "before each" hook
[00:00:07]               └-> "before each" hook
[00:00:07]               └- ✓ pass  (41ms) "task_manager scheduling and running tasks should allow a task with a given ID to be scheduled multiple times"
[00:00:07]             └-> should reschedule if task errors
[00:00:07]               └-> "before each" hook: global before each
[00:00:07]               └-> "before each" hook
[00:00:07]               └-> "before each" hook
[00:00:07]               │ debg --- retry.try error: Cannot read property 'id' of undefined
[00:00:07]               │ debg --- retry.try error: expected 'test-task-for-sample-task-plugin-to-test-task-manager' to sort of equal '73c60290-c59f-11ea-8601-2d16149f36af'
[00:00:08]               │ debg --- retry.try failed again with the same message...
[00:00:08]               │ proc [kibana]   log   [06:58:43.566] [error][plugins][taskManager][taskManager] Task sampleTask "73c60290-c59f-11ea-8601-2d16149f36af" failed: Error: Dangit!!!!!
[00:00:08]               │ debg --- retry.try failed again with the same message...
[00:00:09]               │ debg --- retry.try failed again with the same message...
[00:00:09]               └- ✓ pass  (2.6s) "task_manager scheduling and running tasks should reschedule if task errors"
[00:00:09]             └-> should reschedule if task returns runAt
[00:00:09]               └-> "before each" hook: global before each
[00:00:09]               └-> "before each" hook
[00:00:10]               └-> "before each" hook
[00:00:10]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:11]               │ debg --- retry.try failed again with the same message...
[00:00:11]               │ debg --- retry.try failed again with the same message...
[00:00:12]               │ debg --- retry.try failed again with the same message...
[00:00:12]               │ debg --- retry.try failed again with the same message...
[00:00:13]               │ debg --- retry.try failed again with the same message...
[00:00:13]               │ debg --- retry.try failed again with the same message...
[00:00:14]               │ debg --- retry.try failed again with the same message...
[00:00:14]               │ debg --- retry.try error: expected 15 to sort of equal 16
[00:00:15]               │ debg --- retry.try failed again with the same message...
[00:00:15]               └- ✓ pass  (5.2s) "task_manager scheduling and running tasks should reschedule if task returns runAt"
[00:00:15]             └-> should reschedule if task has an interval
[00:00:15]               └-> "before each" hook: global before each
[00:00:15]               └-> "before each" hook
[00:00:16]               └-> "before each" hook
[00:00:16]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:17]               │ debg --- retry.try failed again with the same message...
[00:00:17]               │ debg --- retry.try failed again with the same message...
[00:00:18]               │ debg --- retry.try failed again with the same message...
[00:00:18]               │ debg --- retry.try failed again with the same message...
[00:00:19]               │ debg --- retry.try failed again with the same message...
[00:00:19]               │ debg --- retry.try failed again with the same message...
[00:00:20]               │ debg --- retry.try failed again with the same message...
[00:00:20]               │ debg --- retry.try error: expected undefined to sort of equal 1
[00:00:21]               │ debg --- retry.try failed again with the same message...
[00:00:21]               └- ✓ pass  (5.2s) "task_manager scheduling and running tasks should reschedule if task has an interval"
[00:00:21]             └-> should support the deprecated interval field
[00:00:21]               └-> "before each" hook: global before each
[00:00:21]               └-> "before each" hook
[00:00:22]               └-> "before each" hook
[00:00:22]               │ proc [kibana]   log   [06:58:57.627] [warning][plugins][taskManager][taskManager] Task of type "sampleTask" has been scheduled with the deprecated 'interval' field which is due to be removed in a future release
[00:00:22]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:23]               │ debg --- retry.try failed again with the same message...
[00:00:23]               │ debg --- retry.try failed again with the same message...
[00:00:24]               │ debg --- retry.try failed again with the same message...
[00:00:24]               │ debg --- retry.try failed again with the same message...
[00:00:25]               │ debg --- retry.try failed again with the same message...
[00:00:25]               │ debg --- retry.try failed again with the same message...
[00:00:26]               │ debg --- retry.try failed again with the same message...
[00:00:26]               │ debg --- retry.try error: expected 1 to sort of equal 0
[00:00:27]               │ debg --- retry.try failed again with the same message...
[00:00:27]               └- ✓ pass  (5.2s) "task_manager scheduling and running tasks should support the deprecated interval field"
[00:00:27]             └-> should return a task run result when asked to run a task now
[00:00:27]               └-> "before each" hook: global before each
[00:00:27]               └-> "before each" hook
[00:00:28]               └-> "before each" hook
[00:00:28]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:29]               │ debg --- retry.try failed again with the same message...
[00:00:29]               │ debg --- retry.try failed again with the same message...
[00:00:30]               │ debg --- retry.try failed again with the same message...
[00:00:30]               │ debg --- retry.try failed again with the same message...
[00:00:31]               │ debg --- retry.try failed again with the same message...
[00:00:31]               │ debg --- retry.try failed again with the same message...
[00:00:32]               │ debg --- retry.try failed again with the same message...
[00:00:33]               │ debg --- retry.try error: expected 1 to sort of equal 2
[00:00:33]               │ debg --- retry.try failed again with the same message...
[00:00:34]               └- ✓ pass  (5.3s) "task_manager scheduling and running tasks should return a task run result when asked to run a task now"
[00:00:34]             └-> should prioritize tasks which are called using runNow
[00:00:34]               └-> "before each" hook: global before each
[00:00:34]               └-> "before each" hook
[00:00:34]               └-> "before each" hook
[00:00:34]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:35]               │ debg --- retry.try failed again with the same message...
[00:00:35]               │ debg --- retry.try failed again with the same message...
[00:00:36]               │ debg --- retry.try failed again with the same message...
[00:00:36]               │ debg --- retry.try failed again with the same message...
[00:00:37]               │ debg --- retry.try failed again with the same message...
[00:00:37]               │ debg --- retry.try failed again with the same message...
[00:00:38]               │ debg --- retry.try failed again with the same message...
[00:00:47]               │ debg --- retry.try error: expected 10 to sort of equal 0
[00:00:48]               │ debg --- retry.try failed again with the same message...
[00:00:48]               │ debg --- retry.try failed again with the same message...
[00:00:49]               │ debg --- retry.try failed again with the same message...
[00:00:49]               │ debg --- retry.try failed again with the same message...
[00:00:50]               │ debg --- retry.try failed again with the same message...
[00:00:51]               │ debg --- retry.try failed again with the same message...
[00:00:51]               │ debg --- retry.try failed again with the same message...
[00:00:52]               └- ✓ pass  (17.2s) "task_manager scheduling and running tasks should prioritize tasks which are called using runNow"
[00:00:52]             └-> should return a task run error result when running a task now fails
[00:00:52]               └-> "before each" hook: global before each
[00:00:52]               └-> "before each" hook
[00:00:53]               └-> "before each" hook
[00:00:53]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:00:53]               │ debg --- retry.try failed again with the same message...
[00:00:54]               │ debg --- retry.try failed again with the same message...
[00:00:54]               │ debg --- retry.try failed again with the same message...
[00:00:55]               │ debg --- retry.try failed again with the same message...
[00:00:55]               │ debg --- retry.try failed again with the same message...
[00:00:56]               │ debg --- retry.try failed again with the same message...
[00:00:56]               │ debg --- retry.try failed again with the same message...
[00:00:57]               │ proc [kibana]   log   [06:59:32.290] [error][plugins][taskManager][taskManager] Task sampleTask "8f1d5e80-c59f-11ea-8601-2d16149f36af" failed: Error: error on run now
[00:00:57]               └- ✓ pass  (4.4s) "task_manager scheduling and running tasks should return a task run error result when running a task now fails"
[00:00:57]             └-> should return a task run error result when trying to run a non-existent task
[00:00:57]               └-> "before each" hook: global before each
[00:00:57]               └-> "before each" hook
[00:00:58]               └-> "before each" hook
[00:00:58]               └- ✓ pass  (23ms) "task_manager scheduling and running tasks should return a task run error result when trying to run a non-existent task"
[00:00:58]             └-> should return a task run error result when trying to run a task now which is already running
[00:00:58]               └-> "before each" hook: global before each
[00:00:58]               └-> "before each" hook
[00:00:58]               └-> "before each" hook
[00:00:58]               │ debg --- retry.try error: Cannot read property 'status' of undefined
[00:00:58]               │ debg --- retry.try failed again with the same message...
[00:00:59]               │ debg --- retry.try error: expected 'idle' to sort of equal 'running'
[00:00:59]               │ debg --- retry.try error: expected 'claiming' to sort of equal 'running'
[00:01:00]               │ debg --- retry.try error: expected 0 to sort of equal 1
[00:01:00]               │ proc [kibana]   log   [06:59:35.709] [warning][plugins][taskManager][taskManager] [Task Ownership error]: (1) tasks were claimed by Kibana, but (2) tasks were fetched
[00:02:02]               │ proc [kibana]   log   [07:00:37.567] [warning][plugins][taskManager][taskManager] Cancelling task sampleTask "922399a0-c59f-11ea-8601-2d16149f36af" as it expired at 2020-07-14T07:00:34.552Z after running for 01m 03s (with timeout set at 1m).
[00:02:02]               │ proc [kibana]   log   [07:00:37.569] [warning][plugins][taskManager][taskManager] Cancelling task sampleTask "922399a0-c59f-11ea-8601-2d16149f36af" as it expired at 2020-07-14T07:00:35.710Z after running for 01m 01s (with timeout set at 1m).
[00:03:00]               └- ✖ fail: task_manager scheduling and running tasks should return a task run error result when trying to run a task now which is already running
[00:03:00]               │      Error: socket hang up
[00:03:00]               │       at createHangUpError (_http_client.js:332:15)
[00:03:00]               │       at Socket.socketOnEnd (_http_client.js:435:23)
[00:03:00]               │       at endReadableNT (_stream_readable.js:1145:12)
[00:03:00]               │       at process._tickCallback (internal/process/next_tick.js:63:19)
[00:03:00]               │ 
[00:03:00]               │ 

Stack Trace

{ Error: socket hang up
    at createHangUpError (_http_client.js:332:15)
    at Socket.socketOnEnd (_http_client.js:435:23)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET', response: undefined }

Build metrics

✅ unchanged

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

@kertal kertal merged commit b4a5162 into elastic:7.x Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants