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

[SIEM] New Platform Cutover #59624

Closed
wants to merge 49 commits into from
Closed

[SIEM] New Platform Cutover #59624

wants to merge 49 commits into from

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Mar 8, 2020

Summary

This moves both the frontend and the backend over to NP. While maps are broken on this branch (#58178), moving the entirety of SIEM at once was significantly easier since it didn't require modification of any internal, relative imports. If we decide that the frontend can't be moved in 7.7 I do have a WIP branch for that, but my preference is to move them both if possible.

There were two main tasks involved in this branch:

  1. Moving files and updating imports
  2. Replacing remaining uiExports with NP equivalents
    1. Server Config
    2. UI Settings (defaults)
    3. Feature Catalog registration
    4. Saved objects registration

NB Regarding review: discounting renames, this branch is ~+1000/-1000 LOC. GitHub (and git) do not by default track file renames across this many files. I highly recommend checking this branch out locally and temporarily setting e.g. git config diff.renameLimit 2500 to see a meaningful diff.

Status

With the exception of maps, this branch is "working" in that it runs without error and I've not yet found any unexpected behavior.

Outstanding tasks/issues

Checklist

Delete any items that are not applicable to this PR.

For maintainers

rylnd and others added 30 commits March 5, 2020 08:21
Throwing a TypeError meant that our manual errors were indistinguishable
from, say, trying to invoke a method on undefined. This adds a custom
error, BadRequestError, that disambiguates that situation.
With Core's new HTTP client, an unsuccessful API call will raise an
error containing the body of the response it received. In the case of
SIEM endpoints, this will include a useful error message with
potentially more specificity than e.g. 'Internal Server Error'.

This adds a type predicate to check for such errors, and adds a handling
case in our errorToToaster handler.

If the error does not contain our SIEM-specific message, it will fall
through as normal and the general error.message will be displayed in the
toaster.
The new HTTP client raises an error on a 4xx or 5xx response, so there
should not be a case where throwIfNotOk is actually going to throw an
error.

The established pattern on the frontend is to catch errors at the call
site and handle them appropriately, so I'm mainly just verifying that
these are caught where they're used, now.
These were living in ML since that's where they originated. However, we
have need of it (and already use it) elsewhere.

The basic pattern for error handling on the frontend is:
1) API call throws error
2) caller catches error and dispatches a toast

throwIfNotOk is meant to convert the error into a useful message in 1).
We currently use both errorToToaster and displayErrorToast to display
that in a toaster in 2)

Now that errorToToaster handles a few different types of errors, and
throwIfNotOk is going to be bypassed due to the new client behavior of
throwing on error, we're going to start consolidating on:

1) Api call throws error
2) caller catches error and passes it to errorToToaster
* Ensures that all callers of these methods properly catch errors
* Updates error toasterification to use errorToToaster
* Simplifies tests now that we mainly just invoke the http client and
return the result.

throwIfNotOk is not being used in the majority of cases, as the client
raises an error and bypasses that call.

The few cases this might break are where we return a 200 but have errors
within the response. Whether throwIfNotOk handled this or not, I'll need
a simpler helper to accomplish the same behavior.
These can be an array of errors OR rules; typing it as such forces
downstream to deal with both. enableRules was being handled correctly
with the bucketing helper, and TS has confirmed the rest are as well.

This obviates the need to raise from our API calls, as bulk errors are
recoverable and we want to both a) continue on with any successful rules
and b) handle the errors as necessary. This is highly dependent on the
caller and so we can't/shouldn't handle it here.
I'm not sure that we're ever using this non-dispatch version, but it was
throwing a type error. Will bring it up in review.
These are unneeded as an error response will already throw an error to
be handled at the call site.
This was left over as a result of elastic#56261
Again, not needed because the client already throws.
* Gets rid of throwIfNotOK usage
* uses core http fetch
This served the same purpose as errorToToaster, but in a less robust
way. All usages have been replaced, so now we say goodbye.
…redicate

There was no functional difference between these two code paths, and
removing these custom errors allowed us to delete a bunch of associated
code as well..
These were mainly related to my swapping any remaining fetch calls with
the core router as good kibana denizens should :salute:
This is enough to get our tests to pass. We can't use the core mocks for
now since there are circular dependencies there, which breaks our build.
* Simplifies our mocking verbosity by leveraging core mocks
* Simplifies test setup by isolating a reference to our fetch mock
* Abstracts response structure to pure helper functions

The try/catch tests had some false positives in that nothing would be
asserted if the code did not throw an error. These proved to be masking
a gap in coverage for our get/create signal index requests, which do not
leverage `throwIfNotOk` but instead rely on the fetch to throw an error;
once that behavior is verified we can update those tests to have our
fetchMock throw errors, and we should be all set.
We no longer re-throw errors, or parse the response, we just return the
result of the client call. Simple!
* Updates plugin to use NP config
  * defines new config previously coming from savedObjects config
* Declares dependencies in kibana.json
  * all required, for now
* cleans up legacy types
* saved object types are not currently registered
* all our ui/chrome imports are failing
* other trickier stuff, but we've got an error list to work through.
I don't know if we were trying to discourage its use, but it's another
uiSetting default so it's going with its siblings.
rylnd added 14 commits March 6, 2020 13:38
* One is a fetch that somehow made it through, and the other is the
retrieval of the kibana version. Both were replaced with KibanaServices.
This has been replaced with NP service calls.
That module includes references to legacy code that breaks our build.
This is a named export, whoops
* Replace build-breaking ui/new_platform mocks with equivalents in core
proper
* Remove unnecessary mocks of ui/new_platform
This breaks our build. I'm not sure what the analog here is.
  ...

 Conflicts:
	x-pack/legacy/plugins/siem/public/components/ml/api/error_to_toaster.ts
	x-pack/legacy/plugins/siem/public/components/ml_popover/api.tsx
	x-pack/legacy/plugins/siem/public/components/toasters/utils.test.ts
	x-pack/legacy/plugins/siem/public/containers/case/api.ts
	x-pack/legacy/plugins/siem/public/containers/case/use_get_tags.tsx
	x-pack/legacy/plugins/siem/public/containers/case/use_post_case.tsx
	x-pack/legacy/plugins/siem/public/containers/case/use_post_comment.tsx
	x-pack/legacy/plugins/siem/public/containers/case/use_update_case.tsx
	x-pack/legacy/plugins/siem/public/containers/case/use_update_comment.tsx
	x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.test.ts
	x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/errors_types/get_index_error.ts
	x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/errors_types/post_index_error.ts
	x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/errors_types/privilege_user_error.ts
	x-pack/legacy/plugins/siem/public/hooks/api/api.tsx
	x-pack/legacy/plugins/siem/public/hooks/api/throw_if_not_ok.test.ts
	x-pack/legacy/plugins/siem/public/hooks/api/throw_if_not_ok.ts
 Conflicts:
	x-pack/legacy/plugins/siem/public/components/ml/api/error_to_toaster.test.ts
	x-pack/legacy/plugins/siem/public/components/toasters/utils.test.ts
	x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/errors_types/index.ts
	x-pack/legacy/plugins/siem/server/saved_objects.ts
	x-pack/plugins/siem/public/components/ml/api/error_to_toaster.test.ts
	x-pack/plugins/siem/public/components/ml/api/error_to_toaster.ts
	x-pack/plugins/siem/public/components/news_feed/index.tsx
	x-pack/plugins/siem/public/components/recent_timelines/helpers.ts
	x-pack/plugins/siem/public/containers/case/use_get_tags.tsx
	x-pack/plugins/siem/public/containers/detection_engine/signals/errors_types/get_index_error.ts
	x-pack/plugins/siem/public/containers/detection_engine/signals/errors_types/index.ts
	x-pack/plugins/siem/public/containers/detection_engine/signals/errors_types/post_index_error.ts
	x-pack/plugins/siem/public/containers/detection_engine/signals/errors_types/privilege_user_error.ts
	x-pack/plugins/siem/public/hooks/api/api.test.ts
	x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts
	x-pack/plugins/transform/public/index.ts
@rylnd rylnd added Feature:New Platform Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Mar 8, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@rylnd rylnd requested a review from rudolf March 8, 2020 23:22
rylnd added 2 commits March 10, 2020 10:13
 Conflicts:
	x-pack/legacy/plugins/siem/public/components/ml/api/error_to_toaster.test.ts
	x-pack/legacy/plugins/siem/public/components/toasters/utils.test.ts
	x-pack/legacy/plugins/siem/public/hooks/api/throw_if_not_ok.test.ts
	x-pack/legacy/plugins/siem/public/hooks/api/throw_if_not_ok.ts
	x-pack/legacy/plugins/siem/public/utils/api/index.ts
	x-pack/legacy/plugins/siem/server/lib/detection_engine/errors/bad_request_error.ts
	x-pack/plugins/siem/public/components/ml/api/throw_if_not_ok.test.ts
	x-pack/plugins/siem/public/components/ml/api/throw_if_not_ok.ts
	x-pack/plugins/siem/public/components/ml_popover/api.tsx
	x-pack/plugins/siem/public/components/toasters/errors.ts
	x-pack/plugins/siem/public/components/toasters/throw_if_not_ok.test.ts
	x-pack/plugins/siem/public/components/toasters/throw_if_not_ok.ts
	x-pack/plugins/siem/public/components/toasters/utils.test.ts
	x-pack/plugins/siem/public/containers/case/use_post_case.tsx
	x-pack/plugins/siem/public/containers/case/use_post_comment.tsx
	x-pack/plugins/siem/public/containers/case/use_update_case.tsx
	x-pack/plugins/siem/public/containers/case/utils.ts
	x-pack/plugins/siem/public/containers/detection_engine/rules/api.ts
	x-pack/plugins/siem/public/containers/detection_engine/signals/api.ts
	x-pack/plugins/siem/server/lib/detection_engine/routes/utils.ts
This import does not break the build; my mistake
@kibanamachine
Copy link
Contributor

💔 Build Failed


Test Failures

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/dashboard/dashboard_query_bar·js.dashboard app using current data dashboard query bar causes panels to reload when refresh is clicked

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: dashboard app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: using current data
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> "before all" hook: loadCurrentData
[00:00:00]               │ info [dashboard/current/data] Loading "mappings.json"
[00:00:00]               │ info [dashboard/current/data] Loading "data.json.gz"
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-dogs-2018-01-01] creating index, cause [api], templates [], shards [5]/[1], mappings [_doc]
[00:00:00]               │ info [dashboard/current/data] Created index "animals-dogs-2018-01-01"
[00:00:00]               │ debg [dashboard/current/data] "animals-dogs-2018-01-01" settings {"index":{"number_of_replicas":"1","number_of_shards":"5"}}
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-dogs-2018-04-10] creating index, cause [api], templates [], shards [5]/[1], mappings [_doc]
[00:00:00]               │ info [dashboard/current/data] Created index "animals-dogs-2018-04-10"
[00:00:00]               │ debg [dashboard/current/data] "animals-dogs-2018-04-10" settings {"index":{"number_of_replicas":"1","number_of_shards":"5"}}
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-cats-2018-01-01] creating index, cause [api], templates [], shards [5]/[1], mappings [_doc]
[00:00:00]               │ info [dashboard/current/data] Created index "animals-cats-2018-01-01"
[00:00:00]               │ debg [dashboard/current/data] "animals-cats-2018-01-01" settings {"index":{"number_of_replicas":"1","number_of_shards":"5"}}
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-cats-2018-04-10] creating index, cause [api], templates [], shards [5]/[1], mappings [_doc]
[00:00:00]               │ info [dashboard/current/data] Created index "animals-cats-2018-04-10"
[00:00:00]               │ debg [dashboard/current/data] "animals-cats-2018-04-10" settings {"index":{"number_of_replicas":"1","number_of_shards":"5"}}
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [dogbreeds] creating index, cause [api], templates [], shards [5]/[1], mappings [_doc]
[00:00:00]               │ info [dashboard/current/data] Created index "dogbreeds"
[00:00:00]               │ debg [dashboard/current/data] "dogbreeds" settings {"index":{"number_of_replicas":"1","number_of_shards":"5"}}
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [logstash-0] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:00]               │ info [dashboard/current/data] Created index "logstash-0"
[00:00:00]               │ debg [dashboard/current/data] "logstash-0" settings {"index":{"analysis":{"analyzer":{"makelogs_url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:10]               │ info progress: 11979
[00:00:11]               │ info [dashboard/current/data] Indexed 6 docs into "animals-dogs-2018-01-01"
[00:00:11]               │ info [dashboard/current/data] Indexed 6 docs into "animals-dogs-2018-04-10"
[00:00:11]               │ info [dashboard/current/data] Indexed 6 docs into "animals-cats-2018-01-01"
[00:00:11]               │ info [dashboard/current/data] Indexed 5 docs into "animals-cats-2018-04-10"
[00:00:11]               │ info [dashboard/current/data] Indexed 6 docs into "dogbreeds"
[00:00:11]               │ info [dashboard/current/data] Indexed 14005 docs into "logstash-0"
[00:05:16]             └-: dashboard query bar
[00:05:16]               └-> "before all" hook
[00:05:16]               └-> "before all" hook
[00:05:16]                 │ info [dashboard/current/kibana] Loading "mappings.json"
[00:05:16]                 │ info [dashboard/current/kibana] Loading "data.json.gz"
[00:05:16]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_1/jVS5-AzfSbWM7C9itrXlrQ] deleting index
[00:05:16]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/JIccmnlIQjaavw7k5Jup6w] deleting index
[00:05:16]                 │ info [dashboard/current/kibana] Deleted existing index [".kibana_2",".kibana_1"]
[00:05:16]                 │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:05:16]                 │ info [dashboard/current/kibana] Created index ".kibana"
[00:05:16]                 │ debg [dashboard/current/kibana] ".kibana" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana/axXnfGiFToCFy1m3-j678w] update_mapping [_doc]
[00:05:17]                 │ info [dashboard/current/kibana] Indexed 84 docs into ".kibana"
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana/axXnfGiFToCFy1m3-j678w] update_mapping [_doc]
[00:05:17]                 │ debg Migrating saved objects
[00:05:17]                 │ proc [kibana]   log   [16:24:53.339] [info][savedobjects-service] Creating index .kibana_2.
[00:05:17]                 │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:05:17]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] updating number_of_replicas to [0] for indices [.kibana_2]
[00:05:17]                 │ proc [kibana]   log   [16:24:53.395] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:05:17]                 │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:05:17]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] updating number_of_replicas to [0] for indices [.kibana_1]
[00:05:17]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] 5327 finished with response BulkByScrollResponse[took=50.5ms,timed_out=false,sliceId=null,updated=0,created=84,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:05:17]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana/axXnfGiFToCFy1m3-j678w] deleting index
[00:05:17]                 │ proc [kibana]   log   [16:24:53.723] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:17]                 │ proc [kibana]   log   [16:24:53.970] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:05:17]                 │ proc [kibana]   log   [16:24:54.020] [info][savedobjects-service] Finished in 683ms.
[00:05:17]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:05:18]                 │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [.kibana_2/_wD5GOjuQ7Wqbb2yWbWt7w] update_mapping [_doc]
[00:05:18]                 │ debg browser[INFO] http://localhost:6121/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-03-10T16:24:53Z
[00:05:18]                 │        Adding connection to http://localhost:6121/elasticsearch
[00:05:18]                 │
[00:05:18]                 │      "
[00:05:19]                 │ debg replacing kibana config doc: {"defaultIndex":"0bf35f60-3dc9-11e8-8660-4d65aa086b3c"}
[00:05:20]                 │ debg navigating to dashboard url: http://localhost:6121/app/kibana#/dashboards
[00:05:20]                 │ debg Navigate to: http://localhost:6121/app/kibana#/dashboards
[00:05:20]                 │ debg ... sleep(700) start
[00:05:20]                 │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1583857496418#/dashboards 350 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:05:20]                 │
[00:05:20]                 │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:05:20]                 │ debg ... sleep(700) end
[00:05:20]                 │ debg returned from get, calling refresh
[00:05:21]                 │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1583857496418#/dashboards 350 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:05:21]                 │
[00:05:21]                 │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:05:21]                 │ debg currentUrl = http://localhost:6121/app/kibana#/dashboards
[00:05:21]                 │          appUrl = http://localhost:6121/app/kibana#/dashboards
[00:05:21]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:05:23]                 │ debg TestSubjects.find(kibanaChrome)
[00:05:23]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:05:23]                 │ debg browser[INFO] http://localhost:6121/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-03-10T16:24:58Z
[00:05:23]                 │        Adding connection to http://localhost:6121/elasticsearch
[00:05:23]                 │
[00:05:23]                 │      "
[00:05:23]                 │ debg ... sleep(501) start
[00:05:23]                 │ debg ... sleep(501) end
[00:05:23]                 │ debg in navigateTo url = http://localhost:6121/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:05:23]                 │ debg TestSubjects.exists(statusPageContainer)
[00:05:23]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:05:26]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:05:26]                 │ debg isGlobalLoadingIndicatorVisible
[00:05:26]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:05:26]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:05:26]                 │ debg browser[INFO] http://localhost:6121/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now)) 350 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:05:26]                 │
[00:05:26]                 │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:05:28]                 │ debg browser[INFO] http://localhost:6121/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-03-10T16:25:04Z
[00:05:28]                 │        Adding connection to http://localhost:6121/elasticsearch
[00:05:28]                 │
[00:05:28]                 │      "
[00:05:28]                 │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:05:29]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:05:29]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:05:29]                 │ debg Load Saved Dashboard dashboard with filter
[00:05:29]                 │ debg gotoDashboardLandingPage
[00:05:29]                 │ debg onDashboardLandingPage
[00:05:29]                 │ debg TestSubjects.exists(dashboardLandingPage)
[00:05:29]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardLandingPage"]') with timeout=5000
[00:05:29]                 │ debg searchForItemWithName: dashboard with filter
[00:05:29]                 │ debg Find.allByCssSelector('.euiFieldSearch') with timeout=10000
[00:05:29]                 │ debg isGlobalLoadingIndicatorVisible
[00:05:29]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:05:29]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:05:31]                 │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:05:31]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:05:31]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:05:31]                 │ debg TestSubjects.click(dashboardListingTitleLink-dashboard-with-filter)
[00:05:31]                 │ debg Find.clickByCssSelector('[data-test-subj="dashboardListingTitleLink-dashboard-with-filter"]') with timeout=10000
[00:05:31]                 │ debg Find.findByCssSelector('[data-test-subj="dashboardListingTitleLink-dashboard-with-filter"]') with timeout=10000
[00:05:31]                 │ debg isGlobalLoadingIndicatorVisible
[00:05:31]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:05:31]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:05:32]                 │ debg browser[WARNING] http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 5:99123 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
[00:05:32]                 │      Arguments: 
[00:05:32]                 │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Mon Apr 09 2018 17:56:08 GMT-0400, _f: undefined, _strict: undefined, _locale: [object Object]
[00:05:32]                 │      Error
[00:05:32]                 │          at Function.createFromInputFallback (http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:99531)
[00:05:32]                 │          at http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:119281
[00:05:32]                 │          at http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:119332
[00:05:32]                 │          at Ct (http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:119626)
[00:05:32]                 │          at St (http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:120003)
[00:05:32]                 │          at Mt (http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:120085)
[00:05:32]                 │          at o (http://localhost:6121/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:6:96369)
[00:05:32]                 │          at Function.convertTimeToUTCString (http://localhost:6121/bundles/7.bundle.js:1:33781)
[00:05:32]                 │          at Function.areTimesEqual (http://localhost:6121/bundles/7.bundle.js:1:33969)
[00:05:32]                 │          at DashboardStateManager.getTimeChanged (http://localhost:6121/bundles/7.bundle.js:1:163398)"
[00:05:32]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:05:32]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:05:32]                 │ debg TestSubjects.missingOrFail(dashboardLandingPage)
[00:05:32]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="dashboardLandingPage"]') with timeout=10000
[00:05:32]               └-> causes panels to reload when refresh is clicked
[00:05:32]                 └-> "before each" hook: global before each
[00:05:32]                 │ info [dashboard/current/data] Unloading indices from "mappings.json"
[00:05:32]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-dogs-2018-01-01/WhvwFEeTTD2kPYesIosdkw] deleting index
[00:05:32]                 │ info [dashboard/current/data] Deleted existing index "animals-dogs-2018-01-01"
[00:05:32]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-dogs-2018-04-10/YzYPPgktRYiqrQ2Q16Ho7w] deleting index
[00:05:32]                 │ info [dashboard/current/data] Deleted existing index "animals-dogs-2018-04-10"
[00:05:32]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-cats-2018-01-01/dfP9M-8PRZ2kZIGJ0Viu9Q] deleting index
[00:05:32]                 │ info [dashboard/current/data] Deleted existing index "animals-cats-2018-01-01"
[00:05:32]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [animals-cats-2018-04-10/LWjfK86qQMWdD3ctJaMhqw] deleting index
[00:05:33]                 │ info [dashboard/current/data] Deleted existing index "animals-cats-2018-04-10"
[00:05:33]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [dogbreeds/e8SAMmfWSEKrgJArfXpF9Q] deleting index
[00:05:33]                 │ info [dashboard/current/data] Deleted existing index "dogbreeds"
[00:05:33]                 │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1583856100689468277] [logstash-0/yxOr4D0jReqFXWmrsPsm2Q] deleting index
[00:05:33]                 │ info [dashboard/current/data] Deleted existing index "logstash-0"
[00:05:33]                 │ info [dashboard/current/data] Unloading indices from "data.json.gz"
[00:05:34]                 │ debg TestSubjects.click(querySubmitButton)
[00:05:34]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:05:34]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:05:34]                 │ debg TestSubjects.find(embeddedSavedSearchDocTable)
[00:05:34]                 │ debg Find.findByCssSelector('[data-test-subj="embeddedSavedSearchDocTable"]') with timeout=10000
[00:05:34]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/dashboard app using current data dashboard query bar causes panels to reload when refresh is clicked.png"
[00:05:34]                 │ info Current URL is: http://localhost:6121/app/kibana#/dashboard/61c58ad0-3dd3-11e8-b2b9-5d5dc1715159?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%27Mon%20Apr%2009%202018%2017:56:08%20GMT-0400%27,to:%27Wed%20Apr%2011%202018%2017:56:08%20GMT-0400%27))&_a=(description:%27%27,filters:!((%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,index:a0f483a0-3dc9-11e8-8660-4d65aa086b3c,key:animal,negate:!f,params:(query:dog,type:phrase),type:phrase,value:dog),query:(match:(animal:(query:dog,type:phrase))))),fullScreenMode:!f,options:(darkTheme:!f,hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:%271%27,w:24,x:0,y:0),id:%2750643b60-3dd3-11e8-b2b9-5d5dc1715159%27,panelIndex:%271%27,type:visualization,version:%278.0.0-SNAPSHOT%27),(embeddableConfig:(),gridData:(h:15,i:%272%27,w:24,x:24,y:0),id:a16d1990-3dca-11e8-8660-4d65aa086b3c,panelIndex:%272%27,type:search,version:%278.0.0-SNAPSHOT%27)),query:(language:lucene,query:%27%27),timeRestore:!t,title:%27dashboard%20with%20filter%27,viewMode:view)
[00:05:34]                 │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/dashboard app using current data dashboard query bar causes panels to reload when refresh is clicked.html
[00:05:34]                 └- ✖ fail: "dashboard app using current data dashboard query bar causes panels to reload when refresh is clicked"
[00:05:34]                 │

Stack Trace

Error: expected 6 to equal 0
    at Assertion.assert (packages/kbn-expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (packages/kbn-expect/expect.js:227:8)
    at Assertion.be (packages/kbn-expect/expect.js:69:22)
    at Context.it (test/functional/apps/dashboard/dashboard_query_bar.js:45:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)

History

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

@rylnd rylnd mentioned this pull request Mar 30, 2020
26 tasks
@rylnd
Copy link
Contributor Author

rylnd commented Apr 27, 2020

Closing in favor of the two (already merged) PRs: #63430 and #64251.

@rylnd rylnd closed this Apr 27, 2020
@rylnd rylnd deleted the siem_all_np branch April 27, 2020 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants