Skip to content

[7.x] [security_solution] enable react-hooks/exhaustive-deps (#68470)#68525

Merged
oatkiller merged 1 commit intoelastic:7.xfrom
oatkiller:backport/7.x/pr-68470
Jun 9, 2020
Merged

[7.x] [security_solution] enable react-hooks/exhaustive-deps (#68470)#68525
oatkiller merged 1 commit intoelastic:7.xfrom
oatkiller:backport/7.x/pr-68470

Conversation

@oatkiller
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

* Enable `react-hooks/exhaustive-deps` rule for security_solution
* Disable it anywhere that it would catch an issue
# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_entries.tsx
@oatkiller oatkiller added the backport This PR is a backport of another PR label Jun 8, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/fleet/unenroll_agent·ts.apis Fleet Endpoints fleet_unenroll_agent allow to unenroll using a list of ids

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:08:52]           └-: Fleet Endpoints
[00:08:52]             └-> "before all" hook
[00:09:00]             └-: fleet_unenroll_agent
[00:09:00]               └-> "before all" hook
[00:09:00]               └-> "before all" hook
[00:09:00]                 │ info [fleet/agents] Loading "mappings.json"
[00:09:00]                 │ info [fleet/agents] Loading "data.json"
[00:09:00]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/TmPck8oTSri967vCfsVLxQ] deleting index
[00:09:00]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_1/KtOeOy6GQd6ftgy7VRbYTw] deleting index
[00:09:00]                 │ info [fleet/agents] Deleted existing index [".kibana_2",".kibana_1"]
[00:09:00]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:09:00]                 │ info [fleet/agents] Created index ".kibana_1"
[00:09:00]                 │ debg [fleet/agents] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:09:00]                 │ info [fleet/agents] Indexed 12 docs into ".kibana"
[00:09:00]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_1/zStPB3qOQ4iKI5WkC2pdAA] update_mapping [_doc]
[00:09:00]                 │ debg Migrating saved objects
[00:09:01]                 │ proc [kibana]   log   [15:46:58.472] [info][savedobjects-service] Creating index .kibana_2.
[00:09:01]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:01]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] updating number_of_replicas to [0] for indices [.kibana_2]
[00:09:01]                 │ proc [kibana]   log   [15:46:58.562] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] to [{"phase":"hot","action":"unfollow","name":"pause-follower-index"}] in policy [ilm-history-ilm-policy]
[00:09:01]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/uP3hL4coRRa9tmJaNL_whA] update_mapping [_doc]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [.kibana-event-log-7.9.0-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] to [{"phase":"hot","action":"unfollow","name":"pause-follower-index"}] in policy [kibana-event-log-policy]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"pause-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"close-follower-index"}] in policy [ilm-history-ilm-policy]
[00:09:01]                 │ proc [kibana]   log   [15:46:58.689] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [.kibana-event-log-7.9.0-000001] from [{"phase":"hot","action":"unfollow","name":"pause-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"close-follower-index"}] in policy [kibana-event-log-policy]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"close-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"unfollow-follower-index"}] in policy [ilm-history-ilm-policy]
[00:09:01]                 │ proc [kibana]   log   [15:46:58.762] [info][savedobjects-service] Finished in 292ms.
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [.kibana-event-log-7.9.0-000001] from [{"phase":"hot","action":"unfollow","name":"close-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"unfollow-follower-index"}] in policy [kibana-event-log-policy]
[00:09:01]               └-> "before all" hook
[00:09:01]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/uP3hL4coRRa9tmJaNL_whA] update_mapping [_doc]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"unfollow-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"open-follower-index"}] in policy [ilm-history-ilm-policy]
[00:09:01]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [events-index_pattern_placeholder] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:01]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [metrics-index_pattern_placeholder] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:01]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [logs-index_pattern_placeholder] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [.kibana-event-log-7.9.0-000001] from [{"phase":"hot","action":"unfollow","name":"unfollow-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"open-follower-index"}] in policy [kibana-event-log-policy]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"open-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-yellow-step"}] in policy [ilm-history-ilm-policy]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [.kibana-event-log-7.9.0-000001] from [{"phase":"hot","action":"unfollow","name":"open-follower-index"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-yellow-step"}] in policy [kibana-event-log-policy]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [ilm-history-2-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-yellow-step"}] to [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] in policy [ilm-history-ilm-policy]
[00:09:01]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] moving index [.kibana-event-log-7.9.0-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-yellow-step"}] to [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] in policy [kibana-event-log-policy]
[00:09:02]                 │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index lifecycle policy [metrics-default]
[00:09:02]                 │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index lifecycle policy [events-default]
[00:09:02]                 │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index lifecycle policy [logs-default]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding component template [logs-settings]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding component template [events-settings]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding component template [logs-mappings]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding component template [metrics-settings]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding component template [metrics-mappings]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding component template [events-mappings]
[00:09:02]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/uP3hL4coRRa9tmJaNL_whA] update_mapping [_doc]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [events]
[00:09:02]                 │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [logs]
[00:09:02]                 │ proc [kibana]   log   [15:46:59.987] [error][ingestManager][plugins] Error connecting to package registry at https://epr.elastic.co/search?package=system&internal=true: Error connecting to package registry at https://epr.elastic.co/search?package=system&internal=true: Backend unavailable, connection timeout
[00:09:03]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/uP3hL4coRRa9tmJaNL_whA] update_mapping [_doc]
[00:09:04]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/uP3hL4coRRa9tmJaNL_whA] update_mapping [_doc]
[00:09:04]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] [.kibana_2/uP3hL4coRRa9tmJaNL_whA] update_mapping [_doc]
[00:09:04]               └-> allow to unenroll using a list of ids
[00:09:04]                 └-> "before each" hook: global before each
[00:09:04]                 └-> "before each" hook
[00:09:04]                   │ proc [kibana]  error  [15:47:00.031]  Error: Internal Server Error
[00:09:04]                   │ proc [kibana]     at HapiResponseAdapter.toError (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/response_adapter.js:132:19)
[00:09:04]                   │ proc [kibana]     at HapiResponseAdapter.toHapiResponse (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/response_adapter.js:86:19)
[00:09:04]                   │ proc [kibana]     at HapiResponseAdapter.handle (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/response_adapter.js:81:17)
[00:09:04]                   │ proc [kibana]     at Router.handle (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/router.js:160:34)
[00:09:04]                   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.core]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [logs-system.auth]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.filesystem]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.memory]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.entropy]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.fsstat]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.load]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.diskio]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.cpu]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.network]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.network_summary]
[00:09:04]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.process]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.raid]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.process_summary]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.socket_summary]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.socket]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [logs-system.syslog]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.uptime]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.users]
[00:09:05]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-centos-tests-xl-1591627522695803752] adding index template [metrics-system.service]
[00:09:05]                 └- ✖ fail: "apis Fleet Endpoints fleet_unenroll_agent allow to unenroll using a list of ids"
[00:09:05]                 │

Stack Trace

Error: expected 200 "OK", got 500 "Internal Server Error"
    at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
    at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
    at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
    at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
    at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
    at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/index.js:718:3)
    at parser (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/index.js:906:18)
    at IncomingMessage.res.on (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/parsers/json.js:19:7)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

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

@oatkiller oatkiller merged commit 6540dde into elastic:7.x Jun 9, 2020
@oatkiller oatkiller deleted the backport/7.x/pr-68470 branch June 9, 2020 16:45
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