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

[Visualize] Make linked saved search work when user navigates back using browser back button #59690

Merged
merged 7 commits into from
Mar 12, 2020

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Mar 9, 2020

Summary

Fixes #57977

This PR fixes the behavior of linked/unlinked saved search while playing with browser history in visualize.

The first intention was to rely on savedSearchId query parameter in the url:

http://localhost:5620/app/kibana#/visualize/create?type=area&savedSearchId=07366aa0-62b9-11ea-8e71-f708552c4e48&_g=()&_a=()

And it was working fine, before I found out, that the saved visualization doesn't have the same url and looks like:

http://localhost:5620/app/kibana#/visualize/edit/fce3f0d0-62b9-11ea-8e71-f708552c4e48?_g=()&_a=()

So the previous approach (rely on linked param in the appState - _a piece of url) was saved,
but improved handling on browser back, forward, reload actions. That means you could unlink from the saved search, then go back in history - the state will become linked again, then you could unlink it again with button as usual

Checklist

Delete any items that are not applicable to this PR.

For maintainers

searchSourceParent.getField('filter')
);
searchSource.setField('index', searchSourceParent.getField('index'));
searchSource.setField('index', currentIndex);
Copy link
Contributor Author

@sulemanof sulemanof Mar 10, 2020

Choose a reason for hiding this comment

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

I'm still not sure, whether we should inherit the index of the parent source while unlinking,
since both the searchSource index and searchSourceParent index are equal always. At least, I didn't find a case, when they could be different.
Maybe it's a question to @ppisljar

Copy link
Member

Choose a reason for hiding this comment

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

if you create visualization based on saved search, then searchsource won't have index field, but the parent will.
calling searchSource.getField('index') will of course show the correct index (as that walks up the tree)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@sulemanof sulemanof marked this pull request as ready for review March 10, 2020 10:40
@sulemanof sulemanof requested a review from a team March 10, 2020 10:40
Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested locally in chrome, fixes the issue of navigation with the back button 👍 thx for having a look for small details 🔍 🕵

@@ -379,6 +380,18 @@ function VisualizeAppController(
},
};

const handleLinkedSearch = linked => {
if (linked && !savedVis.savedSearchId) {
Copy link
Member

Choose a reason for hiding this comment

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

this confuses me ... you desctructure savedSearchId from savedVis ... so this logic is actually:

if (linked && !savedVis.savdSearchId) {
  savedVis.savedSearchId = savedVis.savedSearchId;
  vis.savedSearchId = savedVis.savedSearchId;
  ...
}

also i am not sure why we need to duplicate information on vis.savedSearchId, which is also violating the types (vis has no savedSearchId property)

Copy link
Member

@ppisljar ppisljar Mar 11, 2020

Choose a reason for hiding this comment

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

i think once you unlink, all we need is to delete savedVis.savedSearchId (for the sake of saved object) and remove the parent search source (for the sake of current view)

and when linking back, you will need to select the saved search, so you get the new savedSearchId and you can set it on savedVis

Copy link
Member

Choose a reason for hiding this comment

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

ps: i am working on a small refactor to vis saved object and vis state, which will allow to further clean this up: you will no longer need to care about savedVis here, all you will need to do is remove parent search source and we will provide utilities to serialize searchSource + vis into the saved vis object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @ppisljar , thanks for taking a look and reasonable comments here!
PR updated!
About storing the vis.savedSearchId , I'm not sure why, but it's presented in the vis object on creation of a visualization based on saved search:

image

so would be great if you could get rid of it in your refactoring pr.

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

code LGTM

@sulemanof sulemanof requested a review from a team as a code owner March 11, 2020 14:57
@sulemanof
Copy link
Contributor Author

@ppisljar FYI
It turned out that we have to handle the savedSearchId in vis object, because it's used for building expressions in src/plugins/expressions/common/expression_functions/specs/kibana_context.ts .
Thanks our functional tests for highlighting this.
I added this key to vis type definition.

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

@sulemanof sulemanof merged commit ed68ede into elastic:master Mar 12, 2020
@sulemanof sulemanof deleted the fix/linked_search branch March 12, 2020 09:08
sulemanof added a commit to sulemanof/kibana that referenced this pull request Mar 12, 2020
* Fix linked search behavior

* Revert relying on savedSearchId in url

* Fix comments

* Return back savedSearchId into vis object

Co-authored-by: Elastic Machine <[email protected]>
sulemanof added a commit that referenced this pull request Mar 12, 2020
* Fix linked search behavior

* Revert relying on savedSearchId in url

* Fix comments

* Return back savedSearchId into vis object

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 12, 2020
* master: (45 commits)
  skip flaky suite (elastic#59717)
  UI Metrics use findAll to retrieve all Saved Objects (elastic#59891)
  [Discover] Migrate Context mocha tests to use Jest (elastic#59658)
  [Maps] Move redux reducers and store logic to NP (elastic#58294)
  rebalance x-pack groups (elastic#58930)
  [Discover] Reimplement $route.reload when index pattern changes (elastic#59877)
  [Upgrade Assistant Meta] Breaking changes issue template (elastic#59745)
  Skip CI based on changes in PR (elastic#59939)
  [ML] Transforms: Replace KqlFilterBar with QueryStringInput. (elastic#59723)
  [ML] Functional tests - stabilize date_nanos test (elastic#59986)
  [ML] Typescripting client side endpoint functions (elastic#59928)
  a11y tests on adding columns to discover table (elastic#59375)
  fix graph plugin config path (elastic#59540)
  fix vega config issues (elastic#59737)
  [Upgrade Assistant] Open And Close Slight Refactor (elastic#59890)
  [ML] Adding shared services to ml setup contract (elastic#59730)
  [Visualize] Fix linked search behavior (elastic#59690)
  [ML] Register NP ML plugin for Kibana management section. (elastic#59762)
  [Lens] Adds using queries/filters for field existence endpoint (elastic#59033)
  Delete FilterStateManager and QueryFilter :-D (elastic#59872)
  ...
@rayafratkina rayafratkina changed the title [Visualize] Fix linked search behavior [Visualize] Make linked saved search work when user navigates back using browser back button Apr 15, 2020
@kibanamachine
Copy link
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 failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:01:40]         └-: discover app
[00:01:40]           └-> "before all" hook
[00:01:40]           └-> "before all" hook
[00:09:33]           └-: errors
[00:09:33]             └-> "before all" hook
[00:09:33]             └-> "before all" hook
[00:09:33]               │ info [logstash_functional] Loading "mappings.json"
[00:09:33]               │ info [logstash_functional] Loading "data.json.gz"
[00:09:33]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:09:33]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:09:33]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:09:34]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:09:34]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:09:34]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_1/IH9RIQc_QDGBt9VE60fFig] deleting index
[00:09:34]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/9GbKF9Z0QpSxLa8xA9Pjow] deleting index
[00:09:34]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:09:34]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] applying create index request using v1 templates []
[00:09:34]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:09:34]               │ info [invalid_scripted_field] Created index ".kibana"
[00:09:34]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:09:34]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:09:34]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana/_XCoaW-uRt63TmZ4V0TaJg] update_mapping [_doc]
[00:09:34]               │ debg Migrating saved objects
[00:09:34]               │ proc [kibana]   log   [14:23:51.228] [info][savedobjects-service] Creating index .kibana_2.
[00:09:34]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] applying create index request using v1 templates []
[00:09:34]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:34]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] updating number_of_replicas to [0] for indices [.kibana_2]
[00:09:34]               │ proc [kibana]   log   [14:23:51.274] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:09:34]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] applying create index request using v1 templates []
[00:09:34]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:09:34]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] updating number_of_replicas to [0] for indices [.kibana_1]
[00:09:34]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] 8437 finished with response BulkByScrollResponse[took=17.8ms,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:34]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana/_XCoaW-uRt63TmZ4V0TaJg] deleting index
[00:09:34]               │ proc [kibana]   log   [14:23:51.598] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:09:34]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/bpdB2p3IQAGBFLaZT6vWtA] update_mapping [_doc]
[00:09:34]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/bpdB2p3IQAGBFLaZT6vWtA] update_mapping [_doc]
[00:09:34]               │ proc [kibana]   log   [14:23:51.654] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:09:35]               │ proc [kibana]   log   [14:23:51.683] [info][savedobjects-service] Finished in 456ms.
[00:09:35]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:09:35]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/bpdB2p3IQAGBFLaZT6vWtA] update_mapping [_doc]
[00:09:36]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:09:36]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:09:36]               │ debg ... sleep(700) start
[00:09:36]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586960633280#/discover 340 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:36]               │
[00:09: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:09:37]               │ debg ... sleep(700) end
[00:09:37]               │ debg returned from get, calling refresh
[00:09:37]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586960633280#/discover 340 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:37]               │
[00:09:37]               │ 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:37]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:09:37]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:09:37]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:09:40]               │ debg TestSubjects.find(kibanaChrome)
[00:09:40]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:09:40]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-04-15T14:23:56Z
[00:09:40]               │        Adding connection to http://localhost:6161/elasticsearch
[00:09:40]               │
[00:09:40]               │      "
[00:09:40]               │ debg ... sleep(501) start
[00:09:41]               │ debg ... sleep(501) end
[00:09:41]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:41]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:09:41]               │ debg ... sleep(501) start
[00:09:42]               │ debg ... sleep(501) end
[00:09:42]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:42]               │ debg TestSubjects.exists(statusPageContainer)
[00:09:42]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:09:44]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:09:45]             └-: invalid scripted field error
[00:09:45]               └-> "before all" hook
[00:09:45]               └-> is rendered
[00:09:45]                 └-> "before each" hook: global before each
[00:09:45]                 │ debg TestSubjects.exists(discoverFetchError)
[00:09:45]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:09:47]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:09:48]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:09:48]                 │ info Current URL is: http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:09:48]                 │ 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:09:48]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:09:48]                 │

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:45]         └-: discover app
[00:01:45]           └-> "before all" hook
[00:01:45]           └-> "before all" hook
[00:10:00]           └-: errors
[00:10:00]             └-> "before all" hook
[00:10:00]             └-> "before all" hook
[00:10:00]               │ info [logstash_functional] Loading "mappings.json"
[00:10:00]               │ info [logstash_functional] Loading "data.json.gz"
[00:10:00]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:10:00]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:10:00]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:10:02]               │ info [invalid_scripted_field] Loading "mappings.json"
[00:10:02]               │ info [invalid_scripted_field] Loading "data.json.gz"
[00:10:02]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/ngMbGngrQbO_v-CpBbxaZA] deleting index
[00:10:02]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_1/kK_MlimGTOmO4dPVsU8Mzw] deleting index
[00:10:02]               │ info [invalid_scripted_field] Deleted existing index [".kibana_2",".kibana_1"]
[00:10:02]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] applying create index request using v1 templates []
[00:10:02]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:10:02]               │ info [invalid_scripted_field] Created index ".kibana"
[00:10:02]               │ debg [invalid_scripted_field] ".kibana" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:10:02]               │ info [invalid_scripted_field] Indexed 2 docs into ".kibana"
[00:10:02]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana/HgWiBm-gSZCxKwS2xDqpmg] update_mapping [_doc]
[00:10:02]               │ debg Migrating saved objects
[00:10:02]               │ proc [kibana]   log   [14:12:23.312] [info][savedobjects-service] Creating index .kibana_2.
[00:10:02]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] applying create index request using v1 templates []
[00:10:02]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:02]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] updating number_of_replicas to [0] for indices [.kibana_2]
[00:10:02]               │ proc [kibana]   log   [14:12:23.367] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:10:02]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] applying create index request using v1 templates []
[00:10:02]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:10:02]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] updating number_of_replicas to [0] for indices [.kibana_1]
[00:10:02]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] 8480 finished with response BulkByScrollResponse[took=34.1ms,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:02]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana/HgWiBm-gSZCxKwS2xDqpmg] deleting index
[00:10:02]               │ proc [kibana]   log   [14:12:23.693] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:10:02]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/Krv_YmamQW-iMxHSJoHSLA] update_mapping [_doc]
[00:10:02]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/Krv_YmamQW-iMxHSJoHSLA] update_mapping [_doc]
[00:10:02]               │ proc [kibana]   log   [14:12:23.745] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:10:02]               │ proc [kibana]   log   [14:12:23.782] [info][savedobjects-service] Finished in 471ms.
[00:10:02]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:10:03]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xl-1586958166886436954] [.kibana_2/Krv_YmamQW-iMxHSJoHSLA] update_mapping [_doc]
[00:10:04]               │ debg navigating to discover url: http://localhost:6161/app/kibana#/discover
[00:10:04]               │ debg Navigate to: http://localhost:6161/app/kibana#/discover
[00:10:04]               │ debg ... sleep(700) start
[00:10:04]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586959945376#/discover 340 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:04]               │
[00:10:04]               │ 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:05]               │ debg ... sleep(700) end
[00:10:05]               │ debg returned from get, calling refresh
[00:10:05]               │ debg browser[INFO] http://localhost:6161/app/kibana?_t=1586959945376#/discover 340 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:05]               │
[00:10:05]               │ 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:05]               │ debg currentUrl = http://localhost:6161/app/kibana#/discover
[00:10:05]               │          appUrl = http://localhost:6161/app/kibana#/discover
[00:10:05]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:08]               │ debg TestSubjects.find(kibanaChrome)
[00:10:08]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:10:08]               │ debg browser[INFO] http://localhost:6161/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-04-15T14:12:28Z
[00:10:08]               │        Adding connection to http://localhost:6161/elasticsearch
[00:10:08]               │
[00:10:08]               │      "
[00:10:08]               │ debg ... sleep(501) start
[00:10:08]               │ debg ... sleep(501) end
[00:10:09]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:09]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:09]               │ debg ... sleep(501) start
[00:10:10]               │ debg ... sleep(501) end
[00:10:10]               │ debg in navigateTo url = http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:10]               │ debg TestSubjects.exists(statusPageContainer)
[00:10:10]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:12]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:13]             └-: invalid scripted field error
[00:10:13]               └-> "before all" hook
[00:10:13]               └-> is rendered
[00:10:13]                 └-> "before each" hook: global before each
[00:10:13]                 │ debg TestSubjects.exists(discoverFetchError)
[00:10:13]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="discoverFetchError"]') with timeout=2500
[00:10:15]                 │ debg --- retry.tryForTime error: [data-test-subj="discoverFetchError"] is not displayed
[00:10:16]                 │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/discover app errors invalid scripted field error is rendered.png"
[00:10:16]                 │ info Current URL is: http://localhost:6161/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%2718ea0c30-2d77-11e8-93f2-6f8a391f33ef%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:10:16]                 │ 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:16]                 └- ✖ fail: "discover app errors invalid scripted field error is rendered"
[00:10:16]                 │

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Visualize] Linked search doesn't work when go back in browser history
6 participants