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.9] [Security][Detections] Unskip failing modal tests (#71969) #71992

Merged
merged 2 commits into from
Jul 16, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Jul 16, 2020

Backports the following commits to 7.9:

* Revert "Skip jest tests that timeout waiting for react"

This reverts commit dd9b0b3.

* Unmount async effectful components instead of waiting for them

A previous commit introduced waitForUpdates as a solution to the
warnings introduced by enzymejs/enzyme#2073:
by waiting for the effects to complete we avoid the warning.

However, waiting for the effects to complete could occasionally be very
costly, especially on an overtasked CI machine, and I've been seeing
these tests fail on occasion due to timeouts.

Since a warning message is preferable to a false negative, I'm removing
waitForUpdates and allowing the warnings to occur, as this should be
fixed on a subsequent update of enzyme/react-adapter.

I've also fixed warnings in a few particularly problematic/noisy tests
by simply unmounting the component at the end of the test (this does
not work in an afterEach).
@rylnd rylnd added the backport label Jul 16, 2020
@rylnd
Copy link
Contributor Author

rylnd commented Jul 16, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
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 8 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:07:53]           └-: Fleet Endpoints
[00:07:53]             └-> "before all" hook
[00:07:56]             └-: fleet_unenroll_agent
[00:07:56]               └-> "before all" hook
[00:07:56]               └-> "before all" hook
[00:07:56]                 │ info [fleet/agents] Loading "mappings.json"
[00:07:56]                 │ info [fleet/agents] Loading "data.json"
[00:07:56]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2/S35CBQUtSs-kGhPII7arug] deleting index
[00:07:56]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_1/dhIvMDZxSfiZiBBBDpIXWw] deleting index
[00:07:56]                 │ info [fleet/agents] Deleted existing index [".kibana_2",".kibana_1"]
[00:07:56]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:07:57]                 │ info [fleet/agents] Created index ".kibana_1"
[00:07:57]                 │ debg [fleet/agents] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:07:57]                 │ info [fleet/agents] Indexed 12 docs into ".kibana"
[00:07:57]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_1/CrNT8SpqSXCVB5_5MamiHg] update_mapping [_doc]
[00:07:57]                 │ debg Migrating saved objects
[00:07:57]                 │ proc [kibana]   log   [18:08:14.260] [info][savedobjects-service] Detected mapping change in "dynamic"
[00:07:57]                 │ proc [kibana]   log   [18:08:14.262] [info][savedobjects-service] Creating index .kibana_2.
[00:07:57]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:07:57]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] updating number_of_replicas to [0] for indices [.kibana_2]
[00:07:57]                 │ proc [kibana]   log   [18:08:14.347] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:07:57]                 │ proc [kibana]   log   [18:08:14.362] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:07:57]                 │ proc [kibana]   log   [18:08:14.442] [info][savedobjects-service] Finished in 182ms.
[00:07:57]               └-> "before all" hook
[00:07:57]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2/qA4Bz40sRWeZ1BygKPTEoQ] update_mapping [_doc]
[00:07:57]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [metrics-index_pattern_placeholder] creating index, cause [api], templates [], shards [1]/[1]
[00:07:57]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [events-index_pattern_placeholder] creating index, cause [api], templates [], shards [1]/[1]
[00:07:57]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [logs-index_pattern_placeholder] creating index, cause [api], templates [], shards [1]/[1]
[00:08:00]                 │ proc [kibana]  error  [18:08:17.381] [warning][process] UnhandledPromiseRejectionWarning: Error: [epm-packages:endpoint]: version conflict, required seqNo [15], primary term [1]. current document has seqNo [16] and primary term [1]: [version_conflict_engine_exception] [epm-packages:endpoint]: version conflict, required seqNo [15], primary term [1]. current document has seqNo [16] and primary term [1], with { index_uuid="qA4Bz40sRWeZ1BygKPTEoQ" & shard="0" & index=".kibana_2" }
[00:08:00]                 │ proc [kibana]     at respond (/dev/shm/workspace/install/kibana-7/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:08:00]                 │ proc [kibana]     at checkRespForFailure (/dev/shm/workspace/install/kibana-7/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:08:00]                 │ proc [kibana]     at HttpConnector.<anonymous> (/dev/shm/workspace/install/kibana-7/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:08:00]                 │ proc [kibana]     at IncomingMessage.wrapper (/dev/shm/workspace/install/kibana-7/node_modules/lodash/lodash.js:4929:19)
[00:08:00]                 │ proc [kibana]     at IncomingMessage.emit (events.js:203:15)
[00:08:00]                 │ proc [kibana]     at endReadableNT (_stream_readable.js:1145:12)
[00:08:00]                 │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:63:19)
[00:08:00]                 │ proc [kibana]     at emitWarning (internal/process/promises.js:97:15)
[00:08:00]                 │ proc [kibana]     at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
[00:08:00]                 │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:69:34)
[00:08:00]                 │ proc [kibana]  error  [18:08:17.382] [warning][process] Error: [epm-packages:endpoint]: version conflict, required seqNo [15], primary term [1]. current document has seqNo [16] and primary term [1]: [version_conflict_engine_exception] [epm-packages:endpoint]: version conflict, required seqNo [15], primary term [1]. current document has seqNo [16] and primary term [1], with { index_uuid="qA4Bz40sRWeZ1BygKPTEoQ" & shard="0" & index=".kibana_2" }
[00:08:00]                 │ proc [kibana]     at respond (/dev/shm/workspace/install/kibana-7/node_modules/elasticsearch/src/lib/transport.js:349:15)
[00:08:00]                 │ proc [kibana]     at checkRespForFailure (/dev/shm/workspace/install/kibana-7/node_modules/elasticsearch/src/lib/transport.js:306:7)
[00:08:00]                 │ proc [kibana]     at HttpConnector.<anonymous> (/dev/shm/workspace/install/kibana-7/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
[00:08:00]                 │ proc [kibana]     at IncomingMessage.wrapper (/dev/shm/workspace/install/kibana-7/node_modules/lodash/lodash.js:4929:19)
[00:08:00]                 │ proc [kibana]     at IncomingMessage.emit (events.js:203:15)
[00:08:00]                 │ proc [kibana]     at endReadableNT (_stream_readable.js:1145:12)
[00:08:00]                 │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:63:19)
[00:08:00]                 │ proc [kibana]  error  [18:08:17.393] [warning][process] PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 111)
[00:08:00]                 │ proc [kibana]     at handledRejection (internal/process/promises.js:71:23)
[00:08:00]                 │ proc [kibana]     at promiseRejectHandler (internal/process/promises.js:36:14)
[00:08:00]                 │ proc [kibana]     at Promise.then (<anonymous>)
[00:08:00]                 │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
[00:08:00]               └-> allow to unenroll using a list of ids
[00:08:00]                 └-> "before each" hook: global before each
[00:08:00]                 └-> "before each" hook
[00:08:00]                   │ proc [kibana]  error  [18:08:17.384]  Error: Internal Server Error
[00:08:00]                   │ proc [kibana]     at HapiResponseAdapter.toError (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/response_adapter.js:132:19)
[00:08:00]                   │ proc [kibana]     at HapiResponseAdapter.toHapiResponse (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/response_adapter.js:86:19)
[00:08:00]                   │ proc [kibana]     at HapiResponseAdapter.handle (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/response_adapter.js:81:17)
[00:08:00]                   │ proc [kibana]     at Router.handle (/dev/shm/workspace/install/kibana-7/src/core/server/http/router/router.js:162:34)
[00:08:00]                   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
[00:08:01]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2/qA4Bz40sRWeZ1BygKPTEoQ] update_mapping [_doc]
[00:08:01]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2/qA4Bz40sRWeZ1BygKPTEoQ] update_mapping [_doc]
[00:08:01]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2/qA4Bz40sRWeZ1BygKPTEoQ] update_mapping [_doc]
[00:08:01]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1594919243475253141] [.kibana_2/qA4Bz40sRWeZ1BygKPTEoQ] update_mapping [_doc]
[00:08:02]                 └- ✖ fail: apis Fleet Endpoints fleet_unenroll_agent allow to unenroll using a list of ids
[00:08:02]                 │      Error: expected 200 "OK", got 500 "Internal Server Error"
[00:08:02]                 │       at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
[00:08:02]                 │       at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
[00:08:02]                 │       at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
[00:08:02]                 │       at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
[00:08:02]                 │       at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
[00:08:02]                 │       at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/index.js:718:3)
[00:08:02]                 │       at parser (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/index.js:906:18)
[00:08:02]                 │       at IncomingMessage.res.on (/dev/shm/workspace/kibana/node_modules/superagent/lib/node/parsers/json.js:19:7)
[00:08:02]                 │       at endReadableNT (_stream_readable.js:1145:12)
[00:08:02]                 │       at process._tickCallback (internal/process/next_tick.js:63:19)
[00:08:02]                 │ 
[00:08:02]                 │ 

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)

Build metrics

✅ unchanged

History

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

@rylnd rylnd merged commit 35505a4 into elastic:7.9 Jul 16, 2020
@rylnd rylnd deleted the backport/7.9/pr-71969 branch July 16, 2020 18:57
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.

3 participants