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] Cleanup IP Details graphql #78318

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented Sep 23, 2020

Summary

This PR cleans up the logic that has been moved to the Search Strategy #76928

Checklist

…w-graphql-cleanup

# Conflicts:
#	x-pack/plugins/drilldowns/url_drilldown/public/index.ts
#	x-pack/plugins/security_solution/public/graphql/introspection.json
#	x-pack/plugins/security_solution/public/graphql/types.ts
#	x-pack/plugins/security_solution/server/graphql/types.ts
#	x-pack/plugins/security_solution/server/lib/compose/kibana.ts
#	x-pack/plugins/security_solution/server/lib/types.ts
@patrykkopycinski patrykkopycinski added Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Sep 23, 2020
@patrykkopycinski patrykkopycinski self-assigned this Sep 23, 2020
…ils-graphql-cleanup

# Conflicts:
#	x-pack/plugins/infra/common/http_api/infra_ml/index.ts
#	x-pack/plugins/security_solution/public/graphql/types.ts
@patrykkopycinski patrykkopycinski marked this pull request as ready for review September 23, 2020 20:24
@patrykkopycinski patrykkopycinski requested review from a team as code owners September 23, 2020 20:24
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Chrome UI Functional Tests.test/functional/apps/discover/_doc_navigation·js.discover app doc link in discover "before each" hook for "should open the doc view of the selected document"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: discover app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:18:39]           └-: doc link in discover
[00:18:39]             └-> "before all" hook
[00:18:39]             └-> should open the doc view of the selected document
[00:18:39]               └-> "before each" hook: global before each
[00:18:39]               └-> "before each" hook
[00:18:39]                 │ debg load kibana index with default index pattern
[00:18:39]                 │ info [discover] Loading "mappings.json"
[00:18:39]                 │ info [discover] Loading "data.json.gz"
[00:18:39]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:18:39]                 │ info [discover] Created index ".kibana"
[00:18:39]                 │ debg [discover] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:18:39]                 │ info [discover] Indexed 2 docs into ".kibana"
[00:18:39]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana/qk9xdiwQS8y3D6yAh9dRiA] update_mapping [_doc]
[00:18:39]                 │ debg Migrating saved objects
[00:18:39]                 │ proc [kibana]   log   [21:02:36.774] [info][savedobjects-service] Creating index .kibana_2.
[00:18:39]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:18:39]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] updating number_of_replicas to [0] for indices [.kibana_2]
[00:18:39]                 │ proc [kibana]   log   [21:02:36.813] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:18:39]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:18:39]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] updating number_of_replicas to [0] for indices [.kibana_1]
[00:18:39]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] 8589 finished with response BulkByScrollResponse[took=14.6ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:18:40]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana/qk9xdiwQS8y3D6yAh9dRiA] deleting index
[00:18:40]                 │ proc [kibana]   log   [21:02:37.127] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:18:40]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana_2/Fk5Ob3GeSw-NA5b-eQafpw] update_mapping [_doc]
[00:18:40]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana_2/Fk5Ob3GeSw-NA5b-eQafpw] update_mapping [_doc]
[00:18:40]                 │ proc [kibana]   log   [21:02:37.177] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:18:40]                 │ proc [kibana]   log   [21:02:37.203] [info][savedobjects-service] Finished in 430ms.
[00:18:40]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:18:40]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1600892748754810536] [.kibana_2/Fk5Ob3GeSw-NA5b-eQafpw] update_mapping [_doc]
[00:18:41]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:18:42]                 │ info [logstash_functional] Loading "mappings.json"
[00:18:42]                 │ info [logstash_functional] Loading "data.json.gz"
[00:18:42]                 │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:18:42]                 │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:18:42]                 │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:18:44]                 │ debg navigating to discover url: http://localhost:61191/app/discover#/
[00:18:44]                 │ debg navigate to: http://localhost:61191/app/discover#/
[00:18:44]                 │ debg browser[INFO] http://localhost:61191/app/discover?_t=1600894961199#/ 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:18:44]                 │
[00:18:44]                 │ debg browser[INFO] http://localhost:61191/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:18:44]                 │ debg ... sleep(700) start
[00:18:45]                 │ debg ... sleep(700) end
[00:18:45]                 │ debg returned from get, calling refresh
[00:18:45]                 │ debg browser[INFO] http://localhost:61191/app/discover?_t=1600894961199#/ 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:18:45]                 │
[00:18:45]                 │ debg browser[INFO] http://localhost:61191/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:18:45]                 │ debg currentUrl = http://localhost:61191/app/discover#/
[00:18:45]                 │          appUrl = http://localhost:61191/app/discover#/
[00:18:45]                 │ debg TestSubjects.find(kibanaChrome)
[00:18:45]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:18:46]                 │ debg ... sleep(501) start
[00:18:46]                 │ debg browser[INFO] http://localhost:61191/36561/bundles/core/core.entry.js 97:272211 "Detected an unhandled Promise rejection.
[00:18:46]                 │      Error: Saved \"field\" parameter is now invalid. Please select a new field."
[00:18:46]                 │ERROR browser[SEVERE] http://localhost:61191/36561/bundles/plugin/data/data.plugin.js 13:52039 Uncaught Error: Saved "field" parameter is now invalid. Please select a new field.
[00:18:46]                 │ debg ... sleep(501) end
[00:18:46]                 │ debg in navigateTo url = http://localhost:61191/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:18:46]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:18:47]                 │ debg ... sleep(501) start
[00:18:47]                 │ debg ... sleep(501) end
[00:18:47]                 │ debg in navigateTo url = http://localhost:61191/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:18:47]                 │ debg TestSubjects.exists(statusPageContainer)
[00:18:47]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:18:50]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:18:51]                 │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:18:51]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:18:51]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:18:51]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:18:51]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:18:51]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:18:51]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:18:51]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:18:51]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:18:51]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:18:51]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:18:51]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:18:51]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:18:51]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:18:51]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:18:51]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:18:51]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:18:51]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:18:51]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:51]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:51]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:18:51]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:18:51]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:51]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:52]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:18:52]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:18:52]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:18:52]                 │ debg Find.waitForElementStale with timeout=10000
[00:18:52]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:18:52]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:18:52]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:18:52]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:18:52]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:18:52]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:52]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:52]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:18:52]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:18:52]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:52]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:18:52]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:18:52]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:18:55]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:18:56]                 │ debg TestSubjects.click(querySubmitButton)
[00:18:56]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:18:56]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:18:56]                 │ debg Find.waitForElementStale with timeout=10000
[00:18:56]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:18:56]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:18:56]                 │ debg Find.waitForAttributeToChange('[data-test-subj="discoverDocTable"]', 'data-render-complete', 'true')
[00:18:56]                 │ debg Waiting up to 20000ms for data-render-complete to equal "true"...
[00:18:56]                 │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:19:06]                 │ debg --- retry.waitFor error: Waiting for element to be located By(css selector, [data-test-subj="discoverDocTable"])
[00:19:06]                 │      Wait timed out after 10011ms
[00:19:06]                 │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:19:16]                 │ debg --- retry.waitFor error: Waiting for element to be located By(css selector, [data-test-subj="discoverDocTable"])
[00:19:16]                 │      Wait timed out after 10013ms
[00:19:17]                 │ info Taking screenshot "/dev/shm/workspace/parallel/19/kibana/test/functional/screenshots/failure/discover app doc link in discover _before each_ hook.png"
[00:19:17]                 │ info Current URL is: http://localhost:61191/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:19:17]                 │ info Saving page source to: /dev/shm/workspace/parallel/19/kibana/test/functional/failure_debug/html/discover app doc link in discover _before each_ hook.html
[00:19:17]                 └- ✖ fail: discover app doc link in discover "before each" hook for "should open the doc view of the selected document"
[00:19:17]                 │      Error: timed out waiting for data-render-complete to equal "true" -- last error: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="discoverDocTable"])
[00:19:17]                 │ Wait timed out after 10013ms
[00:19:17]                 │     at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:19:17]                 │     at process._tickCallback (internal/process/next_tick.js:68:7)
[00:19:17]                 │       at onFailure (test/common/services/retry/retry_for_truthy.ts:50:13)
[00:19:17]                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:68:13)
[00:19:17]                 │ 
[00:19:17]                 │ 

Stack Trace

Error: timed out waiting for data-render-complete to equal "true" -- last error: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="discoverDocTable"])
Wait timed out after 10013ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at onFailure (test/common/services/retry/retry_for_truthy.ts:50:13)
    at retryForSuccess (test/common/services/retry/retry_for_success.ts:68:13)

Build metrics

async chunks size

id value diff baseline
securitySolution 10.1MB -8.6KB 10.2MB

page load bundle size

id value diff baseline
securitySolution 810.3KB -312.0B 810.6KB

distributable file count

id value diff baseline
default 45873 -9 45882

History

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

@patrykkopycinski patrykkopycinski merged commit 62ddaa9 into elastic:master Sep 24, 2020
@patrykkopycinski patrykkopycinski deleted the chore/ip-details-graphql-cleanup branch September 24, 2020 07:36
patrykkopycinski added a commit to patrykkopycinski/kibana that referenced this pull request Sep 24, 2020
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants