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

force savedObject API consumers to define SO type explicitly #58022

Merged
merged 5 commits into from
Feb 21, 2020

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Feb 19, 2020

Closes #47334

Dev Docs

The new interface enforces API consumers to specify SO type explicitly. Plugins can use SavedObjectAttributes to ensure their type are serializable, but it shouldn't be used as their domain-specific type.

@mshustov mshustov added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform v8.0.0 v7.7.0 labels Feb 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@@ -84,7 +87,7 @@ export function getArgValueSuggestions() {
es: {
async index(partial: string) {
const search = partial ? `${partial}*` : '*';
const resp = await savedObjectsClient.find({
const resp = await savedObjectsClient.find<IndexPatternAttributes>({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added an explicit dependency on the IndexPatternAttributes to track all places accessing the data plugin saved object. It should simplify further refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elastic/kibana-app-arch let me know it it's okay

@mshustov mshustov marked this pull request as ready for review February 19, 2020 17:51
@mshustov mshustov requested a review from a team as a code owner February 19, 2020 17:51
@mshustov mshustov requested a review from a team February 19, 2020 17:51
@mshustov mshustov requested review from a team as code owners February 19, 2020 17:51
@mshustov mshustov changed the title force savedObject consumers to define type explicitly force savedObject API consumers to define SO type explicitly Feb 19, 2020
@mshustov mshustov added the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label Feb 19, 2020
@joshdover joshdover requested review from a team and removed request for a team February 19, 2020 21:18
Copy link
Contributor

@joshdover joshdover left a comment

Choose a reason for hiding this comment

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

Core changes LGTM. Definitely need each team to review their changes. Some teams that are not included: @elastic/siem (for some reason Github won't let me add as a reviewer??)

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

SIEM changes look good to me, thanks!

Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

Left some comments, but I'll defer to the app-arch team for those, so for me this is 👍 🎉

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

ML changes LGTM. We can follow up with adding the types where this PR adds <any>.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Kibana App changes LGTM

@mshustov mshustov mentioned this pull request Feb 20, 2020
7 tasks
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Alerting changes LGTM

Copy link
Contributor

@crob611 crob611 left a comment

Choose a reason for hiding this comment

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

Canvas changes look good

Copy link
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

Infra changes LGTM 👍

@mshustov mshustov merged commit d61ef26 into elastic:master Feb 21, 2020
@mshustov mshustov deleted the so-types branch February 21, 2020 21:11
mshustov added a commit to mshustov/kibana that referenced this pull request Feb 21, 2020
…#58022)

* force savedObject consumers to define type explicitly

* address comments

* regen docs
mshustov added a commit that referenced this pull request Feb 22, 2020
…#58281)

* force savedObject consumers to define type explicitly

* address comments

* regen docs
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 22, 2020
…_improve-advanced-settings-save

* commit '98aa1d2d4f974f72a9a5397b1b91f11509f6fb7a':
  [SIEM] [Case] Enable case by default. Snake to camel on UI (elastic#57936)
  [File upload] Update remaining File Upload dependencies for NP migration (elastic#58128)
  Use EuiTokens for ES field types (elastic#57911)
  Added UI support for the default action group for Alert Type Model (elastic#57603)
  force savedObject API consumers to define SO type explicitly (elastic#58022)
  Update dependency @elastic/charts to ^17.1.1 (elastic#57634)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Feb 24, 2020
…-out-of-legacy

* 'master' of github.com:elastic/kibana:
  [SIEM] [Case] Enable case by default. Snake to camel on UI (elastic#57936)
  [File upload] Update remaining File Upload dependencies for NP migration (elastic#58128)
  Use EuiTokens for ES field types (elastic#57911)
  Added UI support for the default action group for Alert Type Model (elastic#57603)
  force savedObject API consumers to define SO type explicitly (elastic#58022)
  Update dependency @elastic/charts to ^17.1.1 (elastic#57634)
  [Endpoint] Add a flyout to alert list. (elastic#57926)
  Make sure index pattern has fields before parsing (elastic#58242)
  Sanitize workpad before sending to API (elastic#57704)
  [ML] Transform: Support multi-line JSON notation in advanced editor (elastic#58015)
  [Endpoint] Refactor Management List Tests (elastic#58148)
  [kbn/optimizer] include bootstrap cache key in optimizer cache key (elastic#58176)
  Do not refresh color scale on each lookup (elastic#57792)
  Updating to @elastic/lodash@3.10.1-kibana4 (elastic#54662)
  Trigger context (elastic#57870)
  [ML] Transforms: Adds clone feature to transforms list. (elastic#57837)
  [ML] New Platform server shim: update fields service routes (elastic#58060)
  [Endpoint] EMT-184: change endpoints to metadata up and down the code base. (elastic#58038)
@kibanamachine
Copy link
Contributor

💔 Build Failed


Test Failures

Kibana Pipeline / kibana-intake-agent / Jest Integration Tests.packages/kbn-plugin-generator/integration_tests.running the plugin-generator via 'node scripts/generate_plugin.js plugin-name' with default config then running with es instance 'yarn start' should result in the spec plugin being initialized on kibana's stdout

Link to Jenkins

Standard Out

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


Stack Trace

Error: Command failed with exit code 126: ./bin/elasticsearch-keystore create
    at makeError (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/execa/lib/error.js:56:11)
    at handlePromise (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/execa/index.js:114:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/discover/_errors·js.discover app errors invalid scripted field error is rendered

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:01:52]         └-: discover app
[00:01:52]           └-> "before all" hook
[00:01:52]           └-> "before all" hook
[00:09:49]           └-: errors
[00:09:49]             └-> "before all" hook
[00:09:49]             └-> "before all" hook
[00:09:49]               │ info [logstash_functional] Loading "mappings.json"
[00:09:49]               │ info [logstash_functional] Loading "data.json.gz"
[00:09:49]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:09:49]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:09:49]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:09:50]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:09:50]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:09:50]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_1/PIEEN7RTTfeNTjX1-x_nnA] deleting index
[00:09:50]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/nlnj8VpzSryjWvN0_387Lg] deleting index
[00:09:50]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:09:50]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] applying create index request using v1 templates []
[00:09:50]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:09:50]               │ info [invalid_scripted_field] Created index ".kibana"
[00:09:50]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:09:50]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:09:50]               │ info Creating index .kibana_2.
[00:09:50]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] applying create index request using v1 templates []
[00:09:50]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:50]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] updating number_of_replicas to [0] for indices [.kibana_2]
[00:09:50]               │ info Reindexing .kibana to .kibana_1
[00:09:50]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] applying create index request using v1 templates []
[00:09:50]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:50]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] updating number_of_replicas to [0] for indices [.kibana_1]
[00:09:50]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] 8303 finished with response BulkByScrollResponse[took=22ms,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:09:50]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana/5Ut1FCC4TQ6M8JCXHBf8nA] deleting index
[00:09:50]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:09:50]               │ debg Migrating saved objects config:7.0.0-alpha1, index-pattern:18ea0c30-2d77-11e8-93f2-6f8a391f33ef
[00:09:50]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/id3FIC7QR_yX_UmBkSjXQg] update_mapping [_doc]
[00:09:50]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/id3FIC7QR_yX_UmBkSjXQg] update_mapping [_doc]
[00:09:50]               │ info Pointing alias .kibana to .kibana_2.
[00:09:51]               │ info Finished in 452ms.
[00:09:51]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:09:51]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/id3FIC7QR_yX_UmBkSjXQg] update_mapping [_doc]
[00:09:52]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:09:52]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:09:52]               │ debg ... sleep(700) start
[00:09:52]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538784670#/discover 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:09:52]               │
[00:09:52]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:53]               │ debg ... sleep(700) end
[00:09:53]               │ debg returned from get, calling refresh
[00:09:53]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538784670#/discover 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:09:53]               │
[00:09:53]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:53]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:09:53]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:09:53]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:09:56]               │ debg TestSubjects.find(kibanaChrome)
[00:09:56]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:09:56]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 62:139970 "INFO: 2020-04-10T17:13:07Z
[00:09:56]               │        Adding connection to http://localhost:6161/elasticsearch
[00:09:56]               │
[00:09:56]               │      "
[00:09:56]               │ debg ... sleep(501) start
[00:09:57]               │ debg ... sleep(501) end
[00:09:57]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:57]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:09:57]               │ debg ... sleep(501) start
[00:09:58]               │ debg ... sleep(501) end
[00:09:58]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:58]               │ debg TestSubjects.exists(statusPageContainer)
[00:09:58]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:00]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:01]             └-: invalid scripted field error
[00:10:01]               └-> "before all" hook
[00:10:01]               └-> is rendered
[00:10:01]                 └-> "before each" hook: global before each
[00:10:01]                 │ debg TestSubjects.exists(discoverFetchError)
[00:10:01]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:10:03]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:10:04]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:10:04]                 │ info Current URL is: http://localhost:6161/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:04]                 │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/discover app errors invalid scripted field error is rendered.html
[00:10:04]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:10:04]                 │

Stack Trace

Error: expected false to equal true
    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/discover/_errors.js:41:40)

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/discover/_errors·js.discover app errors invalid scripted field error is rendered

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:01:56]         └-: discover app
[00:01:56]           └-> "before all" hook
[00:01:56]           └-> "before all" hook
[00:10:14]           └-: errors
[00:10:14]             └-> "before all" hook
[00:10:14]             └-> "before all" hook
[00:10:14]               │ info [logstash_functional] Loading "mappings.json"
[00:10:14]               │ info [logstash_functional] Loading "data.json.gz"
[00:10:14]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:10:14]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:10:14]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:10:16]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:10:16]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:10:16]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_1/JlQpXo3MQBmSgS45EQRzYQ] deleting index
[00:10:16]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/nLzu1HZcQRGLRfA4kJY9ew] deleting index
[00:10:16]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:10:16]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] applying create index request using v1 templates []
[00:10:16]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:10:16]               │ info [invalid_scripted_field] Created index ".kibana"
[00:10:16]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:10:16]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:10:17]               │ info Creating index .kibana_2.
[00:10:17]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] applying create index request using v1 templates []
[00:10:17]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:17]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] updating number_of_replicas to [0] for indices [.kibana_2]
[00:10:17]               │ info Reindexing .kibana to .kibana_1
[00:10:17]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] applying create index request using v1 templates []
[00:10:17]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:17]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] updating number_of_replicas to [0] for indices [.kibana_1]
[00:10:17]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] 8348 finished with response BulkByScrollResponse[took=24.4ms,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:10:17]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana/tqz35BHOTfaR-r6fuQiWMQ] deleting index
[00:10:17]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:10:17]               │ debg Migrating saved objects config:7.0.0-alpha1, index-pattern:18ea0c30-2d77-11e8-93f2-6f8a391f33ef
[00:10:17]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/EXKLUAQrQ0qDr1fxydytFw] update_mapping [_doc]
[00:10:17]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/EXKLUAQrQ0qDr1fxydytFw] update_mapping [_doc]
[00:10:17]               │ info Pointing alias .kibana to .kibana_2.
[00:10:17]               │ info Finished in 499ms.
[00:10:17]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:10:18]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536224754854779] [.kibana_2/EXKLUAQrQ0qDr1fxydytFw] update_mapping [_doc]
[00:10:19]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:10:19]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:10:19]               │ debg ... sleep(700) start
[00:10:19]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538055497#/discover 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:10:19]               │
[00:10:19]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:19]               │ debg ... sleep(700) end
[00:10:19]               │ debg returned from get, calling refresh
[00:10:20]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538055497#/discover 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:10:20]               │
[00:10:20]               │ debg browser[INFO] http://localhost:6161/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:20]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:10:20]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:10:20]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:23]               │ debg TestSubjects.find(kibanaChrome)
[00:10:23]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:10:23]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 62:139970 "INFO: 2020-04-10T17:00:58Z
[00:10:23]               │        Adding connection to http://localhost:6161/elasticsearch
[00:10:23]               │
[00:10:23]               │      "
[00:10:23]               │ debg ... sleep(501) start
[00:10:23]               │ debg ... sleep(501) end
[00:10:23]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:23]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:24]               │ debg ... sleep(501) start
[00:10:24]               │ debg ... sleep(501) end
[00:10:24]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:24]               │ debg TestSubjects.exists(statusPageContainer)
[00:10:24]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:27]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:27]             └-: invalid scripted field error
[00:10:27]               └-> "before all" hook
[00:10:27]               └-> is rendered
[00:10:27]                 └-> "before each" hook: global before each
[00:10:27]                 │ debg TestSubjects.exists(discoverFetchError)
[00:10:27]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:10:30]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:10:30]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:10:31]                 │ info Current URL is: http://localhost:6161/app/kibana#/discover?_g=()&_a=(columns:!(_source),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:31]                 │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/discover app errors invalid scripted field error is rendered.html
[00:10:31]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:10:31]                 │

Stack Trace

Error: expected false to equal true
    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/discover/_errors.js:41:40)

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported chore Feature:New Platform release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve SavedObjectAttributes type