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

[Security Solution][Case] Manual attach alert to a case #82996

Merged
merged 17 commits into from
Dec 8, 2020

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Nov 9, 2020

Summary

This PR implements a feature in which a user can attach an alert to a case from the detection's engine alerts table. The user can either create a new case or select an existing case when attaching the alert.

Technical details:

  • usePostComment hook does not take the caseId as an argument anymore.
  • The postComment function takes an extra argument caseId.
  • onRowClick function has been moved outside of useAllCasesModal hook.
  • Redundant all_cases_modal folder has been deleted.

Attach to a new case:

1

Attach to an existing case:

2

Depends on: #82405

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.11.0 Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Nov 9, 2020
@cnasikas cnasikas self-assigned this Nov 9, 2020
@cnasikas cnasikas force-pushed the attach_alert_to_case branch 2 times, most recently from 0d763eb to 4788048 Compare November 23, 2020 15:14
@cnasikas cnasikas changed the title [Security Solution][Case][skip-ci] Attach alert to a case [Security Solution][Case] Manual attach alert to a case Nov 23, 2020
@cnasikas cnasikas added the Feature:Cases Cases feature label Nov 26, 2020
@cnasikas cnasikas marked this pull request as ready for review December 2, 2020 13:19
@cnasikas cnasikas requested review from a team as code owners December 2, 2020 13:19
@cnasikas cnasikas force-pushed the attach_alert_to_case branch 2 times, most recently from 6be47ae to 47b15f9 Compare December 2, 2020 13:51
@elastic elastic deleted a comment from stephmilovic Dec 4, 2020
@cnasikas cnasikas force-pushed the attach_alert_to_case branch 5 times, most recently from 4962659 to 241765d Compare December 5, 2020 14:14
Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

I do feel like the unit tests that you deleted are still valid and should stay in the repo.

@cnasikas
Copy link
Member Author

cnasikas commented Dec 8, 2020

I do feel like the unit tests that you deleted are still valid and should stay in the repo.

Thanks! Which ones?

@cnasikas cnasikas requested a review from XavierM December 8, 2020 14:59
@cnasikas cnasikas force-pushed the attach_alert_to_case branch 2 times, most recently from df9b83f to 812de1e Compare December 8, 2020 18:28
@cnasikas cnasikas force-pushed the attach_alert_to_case branch 2 times, most recently from 0119c64 to 93ba1af Compare December 8, 2020 20:25
@kibanamachine
Copy link
Contributor

kibanamachine commented Dec 9, 2020

💔 Build Failed

Failed CI Steps


Test Failures

X-Pack API Integration Tests.x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data·ts.apis Machine Learning ResultsService GetAnomaliesTableData should fetch anomalies table data

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:06:59]           └-: Machine Learning
[00:06:59]             └-> "before all" hook
[00:06:59]             └-> "before all" hook
[00:06:59]               │ debg creating role ft_ml_source
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_source]
[00:06:59]               │ debg creating role ft_ml_source_readonly
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_source_readonly]
[00:06:59]               │ debg creating role ft_ml_dest
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_dest]
[00:06:59]               │ debg creating role ft_ml_dest_readonly
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_dest_readonly]
[00:06:59]               │ debg creating role ft_ml_ui_extras
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_ui_extras]
[00:06:59]               │ debg creating role ft_default_space_ml_all
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_default_space_ml_all]
[00:06:59]               │ debg creating role ft_default_space_ml_read
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_default_space_ml_read]
[00:06:59]               │ debg creating role ft_default_space_ml_none
[00:06:59]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_default_space_ml_none]
[00:06:59]               │ debg creating user ft_ml_poweruser
[00:06:59]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_poweruser]
[00:06:59]               │ debg created user ft_ml_poweruser
[00:06:59]               │ debg creating user ft_ml_poweruser_spaces
[00:06:59]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_poweruser_spaces]
[00:06:59]               │ debg created user ft_ml_poweruser_spaces
[00:06:59]               │ debg creating user ft_ml_viewer
[00:06:59]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_viewer]
[00:06:59]               │ debg created user ft_ml_viewer
[00:06:59]               │ debg creating user ft_ml_viewer_spaces
[00:06:59]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_viewer_spaces]
[00:06:59]               │ debg created user ft_ml_viewer_spaces
[00:06:59]               │ debg creating user ft_ml_unauthorized
[00:07:00]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_unauthorized]
[00:07:00]               │ debg created user ft_ml_unauthorized
[00:07:00]               │ debg creating user ft_ml_unauthorized_spaces
[00:07:00]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_unauthorized_spaces]
[00:07:00]               │ debg created user ft_ml_unauthorized_spaces
[00:09:55]             └-: ResultsService
[00:09:55]               └-> "before all" hook
[00:09:55]               └-: GetAnomaliesTableData
[00:09:55]                 └-> "before all" hook
[00:09:55]                 └-> "before all" hook
[00:09:55]                   │ info [ml/farequote] Loading "mappings.json"
[00:09:55]                   │ info [ml/farequote] Loading "data.json.gz"
[00:09:55]                   │ info [ml/farequote] Skipped restore for existing index "ft_farequote"
[00:09:56]                   │ debg applying update to kibana config: {"dateFormat:tz":"UTC"}
[00:09:56]                   │ debg Creating anomaly detection job with id 'fq_multi_1_ae'...
[00:09:56]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared] creating index, cause [api], templates [.ml-anomalies-], shards [1]/[1]
[00:09:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-anomalies-shared]
[00:09:56]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-annotations-6] creating index, cause [api], templates [], shards [1]/[1]
[00:09:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-annotations-6]
[00:09:57]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared/q5Rxn70bQfyzImXQSVTbfw] update_mapping [_doc]
[00:09:57]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-config] creating index, cause [auto(bulk api)], templates [.ml-config], shards [1]/[1]
[00:09:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-config]
[00:09:57]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-notifications-000001] creating index, cause [auto(bulk api)], templates [.ml-notifications-000001], shards [1]/[1]
[00:09:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-notifications-000001]
[00:09:57]                   │ debg Waiting up to 5000ms for 'fq_multi_1_ae' to exist...
[00:09:57]                   │ debg Creating datafeed with id 'datafeed-fq_multi_1_se'...
[00:09:58]                   │ debg Waiting up to 5000ms for 'datafeed-fq_multi_1_se' to exist...
[00:09:58]                   │ debg Opening anomaly detection job 'fq_multi_1_ae'...
[00:09:59]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] Opening job [fq_multi_1_ae]
[00:09:59]                   │ info [o.e.x.c.m.u.MlIndexAndAlias] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] About to create first concrete index [.ml-state-000001] with alias [.ml-state-write]
[00:09:59]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-state-000001] creating index, cause [api], templates [.ml-state], shards [1]/[1]
[00:09:59]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-state-000001]
[00:09:59]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] moving index [.ml-state-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ml-size-based-ilm-policy]
[00:09:59]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] Loading model snapshot [N/A], job latest_record_timestamp [N/A]
[00:09:59]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] moving index [.ml-state-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ml-size-based-ilm-policy]
[00:09:59]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] moving index [.ml-state-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ml-size-based-ilm-policy]
[00:09:59]                   │ info [o.e.x.m.p.l.CppLogMessageHandler] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] [autodetect/363347] [CResourceMonitor.cc@74] Setting model memory limit to 20 MB
[00:09:59]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] Successfully set job state to [opened] for job [fq_multi_1_ae]
[00:09:59]                   │ debg Starting datafeed 'datafeed-fq_multi_1_se' with start: '0', end: '1607519341605'...
[00:09:59]                   │ info [o.e.x.m.d.DatafeedJob] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] Datafeed started (from: 1970-01-01T00:00:00.000Z to: 2020-12-09T13:09:01.605Z) with frequency [600000ms]
[00:09:59]                   │ debg Waiting up to 120000ms for datafeed state to be stopped...
[00:09:59]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:59]                   │ debg --- retry.waitForWithTimeout error: expected job state to be stopped but got started
[00:09:59]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared/q5Rxn70bQfyzImXQSVTbfw] update_mapping [_doc]
[00:09:59]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 10000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:00]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:00]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:00]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 20000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:00]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 30000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:00]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:00]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:00]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 40000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:01]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:01]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:01]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 50000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:01]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:01]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:01]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 60000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:02]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:02]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:02]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 70000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:02]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:02]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:02]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 80000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:10:03]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:03]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:03]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:03]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:04]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:04]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:04]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:04]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:05]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:05]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:05]                   │ info [o.e.x.m.d.DatafeedJob] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] Lookback has finished
[00:10:05]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] attempt to stop datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae]
[00:10:05]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] try lock [20s] to stop datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae]...
[00:10:05]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] stopping datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae], acquired [true]...
[00:10:05]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae] has been stopped
[00:10:05]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] Closing job [fq_multi_1_ae], because [close job (api)]
[00:10:05]                   │ info [o.e.x.m.p.l.CppLogMessageHandler] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] [autodetect/363347] [CCmdSkeleton.cc@51] Handled 86274 records
[00:10:05]                   │ info [o.e.x.m.p.l.CppLogMessageHandler] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] [autodetect/363347] [CAnomalyJob.cc@1569] Pruning all models
[00:10:05]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared/q5Rxn70bQfyzImXQSVTbfw] update_mapping [_doc]
[00:10:05]                   │ info [o.e.x.m.p.AbstractNativeProcess] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] State output finished
[00:10:05]                   │ info [o.e.x.m.j.p.a.o.AutodetectResultProcessor] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 120 buckets parsed from autodetect output
[00:10:05]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:10:05]                   │ debg Waiting up to 120000ms for job state to be closed...
[00:10:05]                   │ debg Fetching anomaly detection job stats for job fq_multi_1_ae...
[00:10:05]                   │ debg --- retry.waitForWithTimeout error: expected job state to be closed but got closing
[00:10:06]                   │ debg Fetching anomaly detection job stats for job fq_multi_1_ae...
[00:10:06]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:10:06]                   │ info [o.e.x.m.j.p.a.AutodetectCommunicator] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] job closed
[00:10:06]                   │ debg Fetching anomaly detection job stats for job fq_multi_1_ae...
[00:10:06]                 └-> should fetch anomalies table data
[00:10:06]                   └-> "before each" hook: global before each
[00:10:06]                   └- ✖ fail: apis Machine Learning ResultsService GetAnomaliesTableData should fetch anomalies table data
[00:10:06]                   │       Error: expected 13 to sort of equal 12
[00:10:06]                   │       + expected - actual
[00:10:06]                   │ 
[00:10:06]                   │       -13
[00:10:06]                   │       +12
[00:10:06]                   │       
[00:10:06]                   │       at Assertion.assert (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:100:11)
[00:10:06]                   │       at Assertion.eql (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:244:8)
[00:10:06]                   │       at Context.<anonymous> (test/api_integration/apis/ml/results/get_anomalies_table_data.ts:79:40)
[00:10:06]                   │       at Object.apply (/dev/shm/workspace/parallel/9/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:10:06]                   │ 
[00:10:06]                   │ 

Stack Trace

Error: expected 13 to sort of equal 12
    at Assertion.assert (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.<anonymous> (test/api_integration/apis/ml/results/get_anomalies_table_data.ts:79:40)
    at Object.apply (/dev/shm/workspace/parallel/9/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16) {
  actual: '13',
  expected: '12',
  showDiff: true
}

X-Pack API Integration Tests.x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data·ts.apis Machine Learning ResultsService GetAnomaliesTableData should fetch anomalies table data

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:06:54]           └-: Machine Learning
[00:06:54]             └-> "before all" hook
[00:06:54]             └-> "before all" hook
[00:06:54]               │ debg creating role ft_ml_source
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_source]
[00:06:54]               │ debg creating role ft_ml_source_readonly
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_source_readonly]
[00:06:54]               │ debg creating role ft_ml_dest
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_dest]
[00:06:54]               │ debg creating role ft_ml_dest_readonly
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_dest_readonly]
[00:06:54]               │ debg creating role ft_ml_ui_extras
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_ml_ui_extras]
[00:06:54]               │ debg creating role ft_default_space_ml_all
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_default_space_ml_all]
[00:06:54]               │ debg creating role ft_default_space_ml_read
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_default_space_ml_read]
[00:06:54]               │ debg creating role ft_default_space_ml_none
[00:06:54]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added role [ft_default_space_ml_none]
[00:06:54]               │ debg creating user ft_ml_poweruser
[00:06:54]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_poweruser]
[00:06:54]               │ debg created user ft_ml_poweruser
[00:06:54]               │ debg creating user ft_ml_poweruser_spaces
[00:06:54]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_poweruser_spaces]
[00:06:54]               │ debg created user ft_ml_poweruser_spaces
[00:06:54]               │ debg creating user ft_ml_viewer
[00:06:54]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_viewer]
[00:06:54]               │ debg created user ft_ml_viewer
[00:06:54]               │ debg creating user ft_ml_viewer_spaces
[00:06:54]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_viewer_spaces]
[00:06:54]               │ debg created user ft_ml_viewer_spaces
[00:06:54]               │ debg creating user ft_ml_unauthorized
[00:06:54]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_unauthorized]
[00:06:54]               │ debg created user ft_ml_unauthorized
[00:06:54]               │ debg creating user ft_ml_unauthorized_spaces
[00:06:54]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] added user [ft_ml_unauthorized_spaces]
[00:06:54]               │ debg created user ft_ml_unauthorized_spaces
[00:09:46]             └-: ResultsService
[00:09:46]               └-> "before all" hook
[00:09:46]               └-: GetAnomaliesTableData
[00:09:46]                 └-> "before all" hook
[00:09:46]                 └-> "before all" hook
[00:09:46]                   │ info [ml/farequote] Loading "mappings.json"
[00:09:46]                   │ info [ml/farequote] Loading "data.json.gz"
[00:09:46]                   │ info [ml/farequote] Skipped restore for existing index "ft_farequote"
[00:09:47]                   │ debg applying update to kibana config: {"dateFormat:tz":"UTC"}
[00:09:47]                   │ debg Creating anomaly detection job with id 'fq_multi_1_ae'...
[00:09:47]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared] creating index, cause [api], templates [.ml-anomalies-], shards [1]/[1]
[00:09:47]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-anomalies-shared]
[00:09:47]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-annotations-6] creating index, cause [api], templates [], shards [1]/[1]
[00:09:47]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-annotations-6]
[00:09:47]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared/pf6mRKVLRFOeEQktw3Cc0w] update_mapping [_doc]
[00:09:47]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-config] creating index, cause [auto(bulk api)], templates [.ml-config], shards [1]/[1]
[00:09:47]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-config]
[00:09:47]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-notifications-000001] creating index, cause [auto(bulk api)], templates [.ml-notifications-000001], shards [1]/[1]
[00:09:47]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-notifications-000001]
[00:09:48]                   │ debg Waiting up to 5000ms for 'fq_multi_1_ae' to exist...
[00:09:48]                   │ debg Creating datafeed with id 'datafeed-fq_multi_1_se'...
[00:09:49]                   │ debg Waiting up to 5000ms for 'datafeed-fq_multi_1_se' to exist...
[00:09:49]                   │ debg Opening anomaly detection job 'fq_multi_1_ae'...
[00:09:49]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] Opening job [fq_multi_1_ae]
[00:09:49]                   │ info [o.e.x.c.m.u.MlIndexAndAlias] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] About to create first concrete index [.ml-state-000001] with alias [.ml-state-write]
[00:09:49]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-state-000001] creating index, cause [api], templates [.ml-state], shards [1]/[1]
[00:09:49]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] updating number_of_replicas to [0] for indices [.ml-state-000001]
[00:09:49]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] moving index [.ml-state-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ml-size-based-ilm-policy]
[00:09:49]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] Loading model snapshot [N/A], job latest_record_timestamp [N/A]
[00:09:49]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] moving index [.ml-state-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ml-size-based-ilm-policy]
[00:09:49]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] moving index [.ml-state-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ml-size-based-ilm-policy]
[00:09:50]                   │ info [o.e.x.m.p.l.CppLogMessageHandler] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] [autodetect/255215] [CResourceMonitor.cc@74] Setting model memory limit to 20 MB
[00:09:50]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] Successfully set job state to [opened] for job [fq_multi_1_ae]
[00:09:50]                   │ debg Starting datafeed 'datafeed-fq_multi_1_se' with start: '0', end: '1607517690937'...
[00:09:50]                   │ info [o.e.x.m.d.DatafeedJob] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] Datafeed started (from: 1970-01-01T00:00:00.000Z to: 2020-12-09T12:41:30.937Z) with frequency [600000ms]
[00:09:50]                   │ debg Waiting up to 120000ms for datafeed state to be stopped...
[00:09:50]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:50]                   │ debg --- retry.waitForWithTimeout error: expected job state to be stopped but got started
[00:09:50]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared/pf6mRKVLRFOeEQktw3Cc0w] update_mapping [_doc]
[00:09:50]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 10000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:50]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:50]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:50]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 20000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:51]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 30000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:51]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:51]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:51]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 40000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:51]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:51]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:52]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 50000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:52]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:52]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:52]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 60000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:52]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:52]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:53]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 70000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:53]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:53]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:53]                   │ info [o.e.x.m.j.p.DataCountsReporter] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 80000 records written to autodetect; missingFieldCount=0, invalidDateCount=0, outOfOrderCount=0
[00:09:53]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:53]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:54]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:54]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:54]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:54]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:55]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:55]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:55]                   │ info [o.e.x.m.d.DatafeedJob] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] Lookback has finished
[00:09:55]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:55]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] attempt to stop datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae]
[00:09:55]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] try lock [20s] to stop datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae]...
[00:09:55]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] stopping datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae], acquired [true]...
[00:09:55]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:55]                   │ info [o.e.x.m.d.DatafeedManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [no_realtime] datafeed [datafeed-fq_multi_1_se] for job [fq_multi_1_ae] has been stopped
[00:09:55]                   │ info [o.e.x.m.j.p.a.AutodetectProcessManager] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] Closing job [fq_multi_1_ae], because [close job (api)]
[00:09:55]                   │ info [o.e.x.m.p.l.CppLogMessageHandler] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] [autodetect/255215] [CCmdSkeleton.cc@51] Handled 86274 records
[00:09:55]                   │ info [o.e.x.m.p.l.CppLogMessageHandler] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] [autodetect/255215] [CAnomalyJob.cc@1569] Pruning all models
[00:09:56]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [.ml-anomalies-shared/pf6mRKVLRFOeEQktw3Cc0w] update_mapping [_doc]
[00:09:56]                   │ info [o.e.x.m.p.AbstractNativeProcess] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] State output finished
[00:09:56]                   │ info [o.e.x.m.j.p.a.o.AutodetectResultProcessor] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] 120 buckets parsed from autodetect output
[00:09:56]                   │ debg Fetching datafeed state for datafeed datafeed-fq_multi_1_se
[00:09:56]                   │ debg Waiting up to 120000ms for job state to be closed...
[00:09:56]                   │ debg Fetching anomaly detection job stats for job fq_multi_1_ae...
[00:09:56]                   │ debg --- retry.waitForWithTimeout error: expected job state to be closed but got closing
[00:09:56]                   │ debg Fetching anomaly detection job stats for job fq_multi_1_ae...
[00:09:56]                   │ debg --- retry.waitForWithTimeout failed again with the same message...
[00:09:57]                   │ info [o.e.x.m.j.p.a.AutodetectCommunicator] [kibana-ci-immutable-centos-tests-xxl-1607513949187238360] [fq_multi_1_ae] job closed
[00:09:57]                   │ debg Fetching anomaly detection job stats for job fq_multi_1_ae...
[00:09:57]                 └-> should fetch anomalies table data
[00:09:57]                   └-> "before each" hook: global before each
[00:09:57]                   └- ✖ fail: apis Machine Learning ResultsService GetAnomaliesTableData should fetch anomalies table data
[00:09:57]                   │       Error: expected 13 to sort of equal 12
[00:09:57]                   │       + expected - actual
[00:09:57]                   │ 
[00:09:57]                   │       -13
[00:09:57]                   │       +12
[00:09:57]                   │       
[00:09:57]                   │       at Assertion.assert (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:100:11)
[00:09:57]                   │       at Assertion.eql (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:244:8)
[00:09:57]                   │       at Context.<anonymous> (test/api_integration/apis/ml/results/get_anomalies_table_data.ts:79:40)
[00:09:57]                   │       at Object.apply (/dev/shm/workspace/parallel/9/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:09:57]                   │ 
[00:09:57]                   │ 

Stack Trace

Error: expected 13 to sort of equal 12
    at Assertion.assert (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/9/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.<anonymous> (test/api_integration/apis/ml/results/get_anomalies_table_data.ts:79:40)
    at Object.apply (/dev/shm/workspace/parallel/9/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16) {
  actual: '13',
  expected: '12',
  showDiff: true
}

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2105 2107 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 8.0MB 8.0MB +6.9KB

Distributable file count

id before after diff
default 46897 47654 +757

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 210.2KB 210.2KB -51.0B
Unknown metric groups

async chunk count

id before after diff
securitySolution 22 21 -1

History

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

jloleysens added a commit to jloleysens/kibana that referenced this pull request Dec 9, 2020
…k-field-to-hot-phase

* 'master' of github.com:elastic/kibana: (429 commits)
  simplify popover open state logic (elastic#85379)
  [Logs UI][Metrics UI] Move actions to the kibana header (elastic#84648)
  [Search Source] Do not pick scripted fields if * provided (elastic#85133)
  [Search] Session SO polling (elastic#84225)
  [Transform] Replace legacy elasticsearch client (elastic#84932)
  [Uptime]Refactor header and action menu (elastic#83779)
  Fix agg select external link (elastic#85380)
  [ILM] Show forcemerge in hot when rollover is searchable snapshot is enabled (elastic#85292)
  clear using keyboard (elastic#85042)
  [GS] add tag and dashboard suggestion results (elastic#85144)
  [ML] API integration tests - skip GetAnomaliesTableData
  Add ECS field for event.code. (elastic#85109)
  [Functional][TSVB] Wait for markdown textarea to be cleaned (elastic#85128)
  skip flaky suite (elastic#62060)
  skip flaky suite (elastic#85098)
  Bump highlight.js to v9.18.5 (elastic#84296)
  Add `server.publicBaseUrl` config (elastic#85075)
  [Alerting & Actions ] More debug logging (elastic#85149)
  [Security Solution][Case] Manual attach alert to a case (elastic#82996)
  Loosen UUID regex to accept uuidv1 or uuidv4 (elastic#85338)
  ...

# Conflicts:
#	x-pack/plugins/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.helpers.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index.ts
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/warm_phase/warm_phase.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/i18n_texts.ts
#	x-pack/plugins/index_lifecycle_management/server/routes/api/policies/register_create_route.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants