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][Exceptions] - Update exceptions modal to use existing lists plugin useApi hook #92348

Merged
merged 5 commits into from
Feb 23, 2021

Conversation

yctercero
Copy link
Contributor

@yctercero yctercero commented Feb 23, 2021

Summary

Doing a quick refactor to help with #90634 . While working on #90634 found that I would introduce a circular dependency if I didn't refactor the hook used by the exception builder component to make use of the existing useApi hook in the lists plugin.

#90634 adds temporary ids to item entries to mitigate some React key requirements and the logic to remove/add these id's isn't at the boundary but in the hooks (so as not to pollute the data for everyone wanting to use the api.

An upside is that it removed some of the looping and seemed to speed things up a bit. I briefly considered adding the bulk SO endpoints for exception items, but they are still experimental.

Checklist

@yctercero yctercero requested review from a team as code owners February 23, 2021 05:43
@yctercero yctercero self-assigned this Feb 23, 2021
@yctercero yctercero added bug Fixes for quality problems that affect the customer experience release_note:fix Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detections and Resp Security Detection Response Team v7.12.0 labels Feb 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security·ts.Ingest pipelines app feature controls security global dashboard read with ingest_pipelines_user should render the "Ingest" section with ingest pipelines

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:08:55]         └-: Ingest pipelines app
[00:08:55]           └-> "before all" hook in "Ingest pipelines app"
[00:08:55]           └-: feature controls
[00:08:55]             └-> "before all" hook in "feature controls"
[00:08:55]             └-: security
[00:08:55]               └-> "before all" hook in "security"
[00:08:55]               └-> "before all" hook in "security"
[00:08:55]                 │ info [empty_kibana] Loading "mappings.json"
[00:08:55]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_pre6.5.0_001/uycIHV3CTGqWGu04B69WOA] deleting index
[00:08:55]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_task_manager_8.0.0_001/2cmPxtVzQv2nEt7WIHFW8w] deleting index
[00:08:55]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_001/lnndJiNVQMibbNCENdwvZA] deleting index
[00:08:55]                 │ info [empty_kibana] Deleted existing index ".kibana_8.0.0_001"
[00:08:55]                 │ info [empty_kibana] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:08:55]                 │ info [empty_kibana] Deleted existing index ".kibana_pre6.5.0_001"
[00:08:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:08:55]                 │ info [empty_kibana] Created index ".kibana"
[00:08:55]                 │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:08:55]                 │ debg Migrating saved objects
[00:08:55]                 │ proc [kibana]   log   [21:48:17.343] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET
[00:08:55]                 │ proc [kibana]   log   [21:48:17.346] [info][savedobjects-service] [.kibana] INIT -> LEGACY_SET_WRITE_BLOCK
[00:08:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:08:55]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:08:55]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] adding block write to indices [[.kibana/t4e0mYy3QD2705MsEfN16A]]
[00:08:55]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] completed adding block write to indices [.kibana]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.405] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY
[00:08:55]                 │ proc [kibana]   log   [21:48:17.426] [info][savedobjects-service] [.kibana] LEGACY_SET_WRITE_BLOCK -> LEGACY_CREATE_REINDEX_TARGET
[00:08:55]                 │ proc [kibana]   log   [21:48:17.439] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE
[00:08:55]                 │ proc [kibana]   log   [21:48:17.440] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 99ms
[00:08:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_pre6.5.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:08:55]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] updating number_of_replicas to [0] for indices [.kibana_pre6.5.0_001]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.487] [info][savedobjects-service] [.kibana] LEGACY_CREATE_REINDEX_TARGET -> LEGACY_REINDEX
[00:08:55]                 │ proc [kibana]   log   [21:48:17.492] [info][savedobjects-service] [.kibana] LEGACY_REINDEX -> LEGACY_REINDEX_WAIT_FOR_TASK
[00:08:55]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] 20581 finished with response BulkByScrollResponse[took=1.6ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.496] [info][savedobjects-service] [.kibana] LEGACY_REINDEX_WAIT_FOR_TASK -> LEGACY_DELETE
[00:08:55]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana/t4e0mYy3QD2705MsEfN16A] deleting index
[00:08:55]                 │ proc [kibana]   log   [21:48:17.532] [info][savedobjects-service] [.kibana] LEGACY_DELETE -> SET_SOURCE_WRITE_BLOCK
[00:08:55]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] adding block write to indices [[.kibana_pre6.5.0_001/rdLGn4JgSAKRpWevPZkN9Q]]
[00:08:55]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] completed adding block write to indices [.kibana_pre6.5.0_001]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.566] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP
[00:08:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:08:55]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:08:55]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_reindex_temp][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_reindex_temp][0]]"
[00:08:55]                 │ proc [kibana]   log   [21:48:17.614] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP
[00:08:55]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] 20610 finished with response BulkByScrollResponse[took=1.6ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.619] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP -> REINDEX_SOURCE_TO_TEMP_WAIT_FOR_TASK
[00:08:55]                 │ proc [kibana]   log   [21:48:17.623] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_WAIT_FOR_TASK -> SET_TEMP_WRITE_BLOCK
[00:08:55]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] adding block write to indices [[.kibana_8.0.0_reindex_temp/zsu5nuxwQnWglZBBi-uOsQ]]
[00:08:55]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.657] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET
[00:08:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:08:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:08:55]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:08:55]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_001/Ivo2NzE2SDKmYoj0T_eMfQ] create_mapping
[00:08:55]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_001][0]]"
[00:08:55]                 │ proc [kibana]   log   [21:48:17.747] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> OUTDATED_DOCUMENTS_SEARCH
[00:08:55]                 │ proc [kibana]   log   [21:48:17.753] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH -> UPDATE_TARGET_MAPPINGS
[00:08:55]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_001/Ivo2NzE2SDKmYoj0T_eMfQ] update_mapping [_doc]
[00:08:55]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] 20646 finished with response BulkByScrollResponse[took=1.4ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:08:55]                 │ proc [kibana]   log   [21:48:17.801] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK
[00:08:55]                 │ proc [kibana]   log   [21:48:17.805] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY
[00:08:55]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_reindex_temp/zsu5nuxwQnWglZBBi-uOsQ] deleting index
[00:08:55]                 │ proc [kibana]   log   [21:48:17.840] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE
[00:08:55]                 │ proc [kibana]   log   [21:48:17.840] [info][savedobjects-service] [.kibana] Migration completed after 501ms
[00:08:55]                 │ debg [empty_kibana] Migrated Kibana index after loading Kibana data
[00:08:55]                 │ debg [empty_kibana] Ensured that default space exists in .kibana
[00:08:55]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:08:55]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] [.kibana_8.0.0_001/Ivo2NzE2SDKmYoj0T_eMfQ] update_mapping [_doc]
[00:08:57]                 │ debg navigating to home url: http://localhost:61171/app/home#/
[00:08:57]                 │ debg navigate to: http://localhost:61171/app/home#/
[00:08:57]                 │ debg browser[INFO] http://localhost:61171/app/home?_t=1614116899705#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:08:57]                 │
[00:08:57]                 │ debg browser[INFO] http://localhost:61171/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:08:57]                 │ debg ... sleep(700) start
[00:08:58]                 │ debg ... sleep(700) end
[00:08:58]                 │ debg returned from get, calling refresh
[00:08:59]                 │ERROR browser[SEVERE] http://localhost:61171/40779/bundles/core/core.entry.js 12:161542 TypeError: Failed to fetch
[00:08:59]                 │          at fetch_Fetch.fetchResponse (http://localhost:61171/40779/bundles/core/core.entry.js:6:32451)
[00:08:59]                 │          at async interceptResponse (http://localhost:61171/40779/bundles/core/core.entry.js:6:28637)
[00:08:59]                 │          at async http://localhost:61171/40779/bundles/core/core.entry.js:6:31117
[00:08:59]                 │ debg browser[INFO] http://localhost:61171/app/home?_t=1614116899705#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:08:59]                 │
[00:08:59]                 │ debg browser[INFO] http://localhost:61171/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:08:59]                 │ debg currentUrl = http://localhost:61171/app/home#/
[00:08:59]                 │          appUrl = http://localhost:61171/app/home#/
[00:08:59]                 │ debg TestSubjects.find(kibanaChrome)
[00:08:59]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:08:59]                 │ debg ... sleep(501) start
[00:09:00]                 │ debg ... sleep(501) end
[00:09:00]                 │ debg in navigateTo url = http://localhost:61171/app/home#/
[00:09:00]                 │ debg TestSubjects.exists(statusPageContainer)
[00:09:00]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:09:02]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:09:17]               └-: global dashboard read with ingest_pipelines_user
[00:09:17]                 └-> "before all" hook for "should show the Stack Management nav link"
[00:09:17]                 └-> "before all" hook for "should show the Stack Management nav link"
[00:09:17]                   │ debg set roles = global_dashboard_read,ingest_pipelines_user
[00:09:17]                   │ debg creating user test_user
[00:09:17]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1614113312218166213] updated user [test_user]
[00:09:17]                   │ debg created user test_user
[00:09:17]                   │ debg TestSubjects.exists(kibanaChrome)
[00:09:17]                   │ debg Find.existsByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=2500
[00:09:17]                   │ debg TestSubjects.find(kibanaChrome)
[00:09:17]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=100000
[00:09:17]                   │ debg browser[INFO] http://localhost:61171/app/management?_t=1614116912389 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:17]                   │
[00:09:17]                   │ debg browser[INFO] http://localhost:61171/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:19]                 └-> should show the Stack Management nav link
[00:09:19]                   └-> "before each" hook: global before each for "should show the Stack Management nav link"
[00:09:19]                   │ debg isGlobalLoadingIndicatorVisible
[00:09:19]                   │ debg TestSubjects.exists(globalLoadingIndicator)
[00:09:19]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:09:20]                   │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:09:21]                   │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:09:21]                   │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:09:21]                   │ debg TestSubjects.exists(collapsibleNav)
[00:09:21]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=2500
[00:09:23]                   │ debg --- retry.tryForTime error: [data-test-subj="collapsibleNav"] is not displayed
[00:09:24]                   │ debg TestSubjects.click(toggleNavButton)
[00:09:24]                   │ debg Find.clickByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:09:24]                   │ debg Find.findByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:09:24]                   │ debg TestSubjects.find(collapsibleNav)
[00:09:24]                   │ debg Find.findByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=10000
[00:09:24]                   │ debg Find.existsByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=2500
[00:09:24]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:09:24]                   │ debg Find.clickByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:09:24]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:09:24]                   └- ✓ pass  (5.4s) "Ingest pipelines app feature controls security global dashboard read with ingest_pipelines_user should show the Stack Management nav link"
[00:09:24]                 └-> should render the "Ingest" section with ingest pipelines
[00:09:24]                   └-> "before each" hook: global before each for "should render the "Ingest" section with ingest pipelines"
[00:09:24]                   │ debg navigating to management url: http://localhost:61171/app/management
[00:09:24]                   │ debg navigate to: http://localhost:61171/app/management
[00:09:24]                   │ debg browser[INFO] http://localhost:61171/app/management?_t=1614116926564 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:24]                   │
[00:09:24]                   │ debg browser[INFO] http://localhost:61171/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:24]                   │ debg ... sleep(700) start
[00:09:25]                   │ debg ... sleep(700) end
[00:09:25]                   │ debg returned from get, calling refresh
[00:09:25]                   │ debg browser[INFO] http://localhost:61171/app/management?_t=1614116926564 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:25]                   │
[00:09:25]                   │ debg browser[INFO] http://localhost:61171/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:26]                   │ debg currentUrl = http://localhost:61171/app/management
[00:09:26]                   │          appUrl = http://localhost:61171/app/management
[00:09:26]                   │ debg TestSubjects.find(kibanaChrome)
[00:09:26]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:09:26]                   │ debg ... sleep(501) start
[00:09:27]                   │ debg ... sleep(501) end
[00:09:27]                   │ debg in navigateTo url = http://localhost:61171/app/management
[00:09:27]                   │ debg TestSubjects.exists(statusPageContainer)
[00:09:27]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:09:29]                   │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:09:30]                   │ debg Find.allByCssSelector('.mgtSideBarNav > .euiSideNav__content > .euiSideNavItem') with timeout=10000
[00:09:30]                   │ info Taking screenshot "/dev/shm/workspace/parallel/17/kibana/x-pack/test/functional/screenshots/failure/Ingest pipelines app feature controls security global dashboard read with ingest_pipelines_user should render the _Ingest_ section with ingest pipelines.png"
[00:09:30]                   │ info Current URL is: http://localhost:61171/app/management
[00:09:30]                   │ info Saving page source to: /dev/shm/workspace/parallel/17/kibana/x-pack/test/functional/failure_debug/html/Ingest pipelines app feature controls security global dashboard read with ingest_pipelines_user should render the _Ingest_ section with ingest pipelines.html
[00:09:30]                   └- ✖ fail: Ingest pipelines app feature controls security global dashboard read with ingest_pipelines_user should render the "Ingest" section with ingest pipelines
[00:09:30]                   │      Error: expected [ { sectionId: 'ingest',
[00:09:30]                   │     sectionLinks: [ 'ingest_pipelines' ] },
[00:09:30]                   │   { sectionId: 'insightsAndAlerting',
[00:09:30]                   │     sectionLinks: [ 'watcher' ] } ] to have a length of 1 but got 2
[00:09:30]                   │       at Assertion.assert (/dev/shm/workspace/parallel/17/kibana/packages/kbn-expect/expect.js:100:11)
[00:09:30]                   │       at Assertion.length (/dev/shm/workspace/parallel/17/kibana/packages/kbn-expect/expect.js:374:8)
[00:09:30]                   │       at Context.<anonymous> (test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security.ts:63:34)
[00:09:30]                   │       at runMicrotasks (<anonymous>)
[00:09:30]                   │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:09:30]                   │       at Object.apply (/dev/shm/workspace/parallel/17/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:09:30]                   │ 
[00:09:30]                   │ 

Stack Trace

Error: expected [ { sectionId: 'ingest',
    sectionLinks: [ 'ingest_pipelines' ] },
  { sectionId: 'insightsAndAlerting',
    sectionLinks: [ 'watcher' ] } ] to have a length of 1 but got 2
    at Assertion.assert (/dev/shm/workspace/parallel/17/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.length (/dev/shm/workspace/parallel/17/kibana/packages/kbn-expect/expect.js:374:8)
    at Context.<anonymous> (test/functional/apps/ingest_pipelines/feature_controls/ingest_pipelines_security.ts:63:34)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Object.apply (/dev/shm/workspace/parallel/17/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

Metrics [docs]

Async chunks

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

id before after diff
securitySolution 7.7MB 7.7MB -402.0B

Page load bundle

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

id before after diff
lists 143.2KB 143.5KB +370.0B

History

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

cc @yctercero

Copy link
Contributor

@dplumlee dplumlee left a comment

Choose a reason for hiding this comment

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

looks good, nice refactor

@yctercero yctercero merged commit 226ed17 into elastic:master Feb 23, 2021
yctercero added a commit to yctercero/kibana that referenced this pull request Feb 23, 2021
…ting lists plugin useApi hook (elastic#92348)

Doing a quick refactor to help with elastic#90634 . While working on elastic#90634 found that I would introduce a circular dependency if I didn't refactor the hook used by the exception builder component to make use of the existing useApi hook in the lists plugin.

elastic#90634 adds temporary ids to item entries to mitigate some React key requirements and the logic to remove/add these id's isn't at the boundary but in the hooks (so as not to pollute the data for everyone wanting to use the api.

An upside is that it removed some of the looping and seemed to speed things up a bit. I briefly considered adding the bulk SO endpoints for exception items, but they are still experimental.
yctercero added a commit to yctercero/kibana that referenced this pull request Feb 23, 2021
…ting lists plugin useApi hook (elastic#92348)

Doing a quick refactor to help with elastic#90634 . While working on elastic#90634 found that I would introduce a circular dependency if I didn't refactor the hook used by the exception builder component to make use of the existing useApi hook in the lists plugin.

elastic#90634 adds temporary ids to item entries to mitigate some React key requirements and the logic to remove/add these id's isn't at the boundary but in the hooks (so as not to pollute the data for everyone wanting to use the api.

An upside is that it removed some of the looping and seemed to speed things up a bit. I briefly considered adding the bulk SO endpoints for exception items, but they are still experimental.
yctercero added a commit that referenced this pull request Feb 24, 2021
…ting lists plugin useApi hook (#92348) (#92534)

Doing a quick refactor to help with #90634 . While working on #90634 found that I would introduce a circular dependency if I didn't refactor the hook used by the exception builder component to make use of the existing useApi hook in the lists plugin.

#90634 adds temporary ids to item entries to mitigate some React key requirements and the logic to remove/add these id's isn't at the boundary but in the hooks (so as not to pollute the data for everyone wanting to use the api.

An upside is that it removed some of the looping and seemed to speed things up a bit. I briefly considered adding the bulk SO endpoints for exception items, but they are still experimental.
yctercero added a commit that referenced this pull request Feb 24, 2021
…ting lists plugin useApi hook (#92348) (#92535)

Doing a quick refactor to help with #90634 . While working on #90634 found that I would introduce a circular dependency if I didn't refactor the hook used by the exception builder component to make use of the existing useApi hook in the lists plugin.

#90634 adds temporary ids to item entries to mitigate some React key requirements and the logic to remove/add these id's isn't at the boundary but in the hooks (so as not to pollute the data for everyone wanting to use the api.

An upside is that it removed some of the looping and seemed to speed things up a bit. I briefly considered adding the bulk SO endpoints for exception items, but they are still experimental.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 25, 2021
…bana into task-manager/docs-monitoring

* 'task-manager/docs-monitoring' of github.com:gmmorris/kibana: (120 commits)
  Bump the CI Node.js version from 14.15.4 to 14.16.0 (elastic#92578)
  [Uptime] Search made easy (elastic#88581)
  [Lens] Stop requesting stats on Records field (elastic#92508)
  [APM] Correlations style polish in prep for release (elastic#92514)
  [Lens] Fix sorting undefined, null and NaN values (elastic#92575)
  Put environment back in uiFilters (elastic#92561)
  [Discover] Fix sorting by _score behavior (elastic#92132)
  Add metricbeat steps to jenkins_build_load_testing.sh (elastic#90290)
  [Usage Collection] Remove unused UI Metric APIs (elastic#91620)
  Fix timelion deprecation documentation links (elastic#92576)
  [TSVB] Enable `dual mode`, support index patterns and strings (elastic#92395)
  Fix text align in Safari (elastic#92374)
  [Actions][Doc] Clean up Actions README (elastic#91789)
  chore(NA): add missing files to exclude when building bazel prod packages (elastic#92506)
  [Security Solution][Endpoint][Admin] Match Policy Details in Security Solution with Fleet (elastic#92047)
  Revert "[build] Add task skips intended for partial builds (elastic#92076)"
  [Enterprise Search] Change icon for error in EuiCallouts (elastic#92527)
  [Alerts][Docs] Alert types doc update. Added refs to applications specific alerts groups. (elastic#91787)
  [Security Solution][Exceptions] - Update exceptions modal to use existing lists plugin useApi hook (elastic#92348)
  [DOCS] Updates refresh text in index pattern doc (elastic#92469)
  ...
@yctercero yctercero deleted the exceptions_creation_api branch October 13, 2021 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants