Skip to content

Trigger context#57870

Merged
streamich merged 17 commits intoelastic:masterfrom
streamich:trigger-context
Feb 21, 2020
Merged

Trigger context#57870
streamich merged 17 commits intoelastic:masterfrom
streamich:trigger-context

Conversation

@streamich
Copy link
Copy Markdown
Contributor

@streamich streamich commented Feb 18, 2020

Summary

This PR makes trigger context type typed in TypeScript and linked to Trigger type. Now when you execute a trigger or when an action receives trigger context it can be well typed. I've added use of this functionality to visualization embeddable in the place where it executes a trigger.

Dev Docs

Improved types for trigger contexts, which are consumed by actions.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@streamich streamich requested a review from a team as a code owner February 18, 2020 16:18
@streamich streamich added Feature:Actions release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. review Team:AppArch v7.7.0 v8.0.0 labels Feb 18, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@stacey-gammon
Copy link
Copy Markdown

Running into some issues with the types...

Using this function, no error reported:
Screen Shot 2020-02-20 at 3 08 15 PM

I changed the signature to:

  public readonly executeTriggerActions = async <T extends string>(
    triggerId: T,
    context: TriggerContextMapping[T]
  ) => {
    const trigger = this.getTrigger<T>(triggerId);
    await trigger.exec(context);
  };

and now correctly get errors

Screen Shot 2020-02-20 at 3 08 43 PM

@stacey-gammon
Copy link
Copy Markdown

I made some suggestions here: https://github.com/streamich/kibana/pull/1

@streamich
Copy link
Copy Markdown
Contributor Author

@stacey-gammon thanks, I've merged your suggestions.

Copy link
Copy Markdown

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

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

lgtm, really nice to see this extra typescript, thanks for doing it!

@streamich streamich merged commit 68e79e4 into elastic:master Feb 21, 2020
streamich added a commit that referenced this pull request Feb 21, 2020
* feat: 🎸 annotate with comments Trigger and add createContext(

* feat: 🎸 add TriggerContext<T> type

* feat: 🎸 improve trigger setup in embeddable plugin

* feat: 🎸 export trigger vars and types from embeddable

* feat: 🎸 add internal representation of Trigger

* feat: 🎸 use new trigger interface to execute in vis embeddable

* feat: 🎸 add TriggerContextMapping interface

* feat: 🎸 improve trigger types

* refactor: 💡 remove trigger ID getter

* chore: 🤖 remove commented out line

* chore: 🤖 re-export more trigger stuff

* refactor: 💡 simplify Trigger interface

* suggestions

* Remove unused type

Co-authored-by: Stacey Gammon <gammon@elastic.co>

Co-authored-by: Stacey Gammon <gammon@elastic.co>
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 21, 2020
…_improve-advanced-settings-save

* commit '02efb01c481f9f24d8d707f06dfc68b2fb805001': (43 commits)
  [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)
  document difference between log record formats (elastic#57798)
  Expose elasticsearch config schema (elastic#57655)
  [ui/agg_response/tabify] update types for search/expressions/build_tabular_inspector_data.ts (elastic#58130)
  [SIEM] Cleans Cypress tests code (elastic#58134)
  fix: 🐛 make dev server Storybook builds work again (elastic#58188)
  Prevent core savedObjects plugin from being overridden (elastic#58193)
  Expose serverBasePath on client-side (elastic#58070)
  Fix legend sizing on area charts (elastic#58083)
  ...
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
Copy Markdown
Contributor

💔 Build Failed


Test Failures

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:49]         └-: discover app
[00:01:49]           └-> "before all" hook
[00:01:49]           └-> "before all" hook
[00:10:03]           └-: errors
[00:10:03]             └-> "before all" hook
[00:10:03]             └-> "before all" hook
[00:10:03]               │ info [logstash_functional] Loading "mappings.json"
[00:10:03]               │ info [logstash_functional] Loading "data.json.gz"
[00:10:03]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:10:03]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:10:03]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:10:04]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:10:04]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:10:04]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_1/tflt5DZYQyeIp1wx_N1NoQ] deleting index
[00:10:04]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/ma-Tg9B6TR6VLUtNtD0h-g] deleting index
[00:10:04]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:10:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] applying create index request using v1 templates []
[00:10:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:10:04]               │ info [invalid_scripted_field] Created index ".kibana"
[00:10:04]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:10:04]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:10:04]               │ info Creating index .kibana_2.
[00:10:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] applying create index request using v1 templates []
[00:10:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:04]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] updating number_of_replicas to [0] for indices [.kibana_2]
[00:10:05]               │ info Reindexing .kibana to .kibana_1
[00:10:05]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] applying create index request using v1 templates []
[00:10:05]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:05]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] updating number_of_replicas to [0] for indices [.kibana_1]
[00:10:05]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] 8321 finished with response BulkByScrollResponse[took=21.7ms,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:05]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana/4G-zOyNaQm-xydCus30Liw] deleting index
[00:10:05]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:10:05]               │ debg Migrating saved objects config:7.0.0-alpha1, index-pattern:18ea0c30-2d77-11e8-93f2-6f8a391f33ef
[00:10:05]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/oH0c612DRdWyLxVTZ-Gz3w] update_mapping [_doc]
[00:10:05]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/oH0c612DRdWyLxVTZ-Gz3w] update_mapping [_doc]
[00:10:05]               │ info Pointing alias .kibana to .kibana_2.
[00:10:05]               │ info Finished in 445ms.
[00:10:05]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:10:06]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/oH0c612DRdWyLxVTZ-Gz3w] update_mapping [_doc]
[00:10:07]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:10:07]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:10:07]               │ debg ... sleep(700) start
[00:10:07]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538918803#/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:07]               │
[00:10:07]               │ 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:07]               │ debg ... sleep(700) end
[00:10:07]               │ debg returned from get, calling refresh
[00:10:08]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538918803#/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:08]               │
[00:10:08]               │ 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:08]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:10:08]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:10:08]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:12]               │ debg TestSubjects.find(kibanaChrome)
[00:10:12]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:10:12]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 67:139970 "INFO: 2020-04-10T17:15:22Z
[00:10:12]               │        Adding connection to http://localhost:6161/elasticsearch
[00:10:12]               │
[00:10:12]               │      "
[00:10:12]               │ debg ... sleep(501) start
[00:10:12]               │ debg ... sleep(501) end
[00:10:12]               │ 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:12]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:13]               │ debg ... sleep(501) start
[00:10:13]               │ debg ... sleep(501) end
[00:10:13]               │ 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:13]               │ debg TestSubjects.exists(statusPageContainer)
[00:10:13]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:16]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:16]             └-: invalid scripted field error
[00:10:16]               └-> "before all" hook
[00:10:16]               └-> is rendered
[00:10:16]                 └-> "before each" hook: global before each
[00:10:16]                 │ debg TestSubjects.exists(discoverFetchError)
[00:10:16]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:10:19]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:10:19]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:10:19]                 │ 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:20]                 │ 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:20]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:10:20]                 │

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-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:53]         └-: discover app
[00:01:53]           └-> "before all" hook
[00:01:53]           └-> "before all" hook
[00:10:31]           └-: errors
[00:10:31]             └-> "before all" hook
[00:10:31]             └-> "before all" hook
[00:10:31]               │ info [logstash_functional] Loading "mappings.json"
[00:10:31]               │ info [logstash_functional] Loading "data.json.gz"
[00:10:31]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:10:31]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:10:31]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:10:32]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:10:32]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:10:32]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/sj0iTOOSTO679Xt84GVvsw] deleting index
[00:10:32]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_1/YKLUOkq9S0mYM4aLozqe1w] deleting index
[00:10:32]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:10:32]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] applying create index request using v1 templates []
[00:10:32]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:10:33]               │ info [invalid_scripted_field] Created index ".kibana"
[00:10:33]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:10:33]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:10:33]               │ info Creating index .kibana_2.
[00:10:33]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] applying create index request using v1 templates []
[00:10:33]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:33]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] updating number_of_replicas to [0] for indices [.kibana_2]
[00:10:33]               │ info Reindexing .kibana to .kibana_1
[00:10:33]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] applying create index request using v1 templates []
[00:10:33]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:33]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] updating number_of_replicas to [0] for indices [.kibana_1]
[00:10:33]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] 8375 finished with response BulkByScrollResponse[took=23.2ms,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:33]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana/InAm_Z_HTWiGvFilUCMejA] deleting index
[00:10:33]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:10:33]               │ debg Migrating saved objects config:7.0.0-alpha1, index-pattern:18ea0c30-2d77-11e8-93f2-6f8a391f33ef
[00:10:33]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/oUZBCBKJTeyaxYEURS3ktA] update_mapping [_doc]
[00:10:33]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/oUZBCBKJTeyaxYEURS3ktA] update_mapping [_doc]
[00:10:33]               │ info Pointing alias .kibana to .kibana_2.
[00:10:33]               │ info Finished in 503ms.
[00:10:33]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:10:34]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-oraclelinux-tests-xl-1586536285253749488] [.kibana_2/oUZBCBKJTeyaxYEURS3ktA] update_mapping [_doc]
[00:10:35]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:10:35]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:10:35]               │ debg ... sleep(700) start
[00:10:35]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538189477#/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:35]               │
[00:10:35]               │ 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:36]               │ debg ... sleep(700) end
[00:10:36]               │ debg returned from get, calling refresh
[00:10:36]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586538189477#/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:36]               │
[00:10:36]               │ 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:36]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:10:36]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:10:36]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:41]               │ debg TestSubjects.find(kibanaChrome)
[00:10:41]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:10:41]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 67:139970 "INFO: 2020-04-10T17:03:13Z
[00:10:41]               │        Adding connection to http://localhost:6161/elasticsearch
[00:10:41]               │
[00:10:41]               │      "
[00:10:41]               │ debg ... sleep(501) start
[00:10:41]               │ debg ... sleep(501) end
[00:10:41]               │ 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:41]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:42]               │ debg ... sleep(501) start
[00:10:42]               │ debg ... sleep(501) end
[00:10:42]               │ 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:42]               │ debg TestSubjects.exists(statusPageContainer)
[00:10:42]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:45]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:45]             └-: invalid scripted field error
[00:10:45]               └-> "before all" hook
[00:10:45]               └-> is rendered
[00:10:45]                 └-> "before each" hook: global before each
[00:10:45]                 │ debg TestSubjects.exists(discoverFetchError)
[00:10:45]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:10:48]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:10:48]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:10:49]                 │ 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:49]                 │ 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:49]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:10:49]                 │

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

Feature:Actions release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. review v7.7.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants