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

[7.15] [Dashboard] Retain Viewmode State in Session (#112302) #112708

Merged
merged 4 commits into from
Sep 27, 2021

Conversation

ThomThomson
Copy link
Contributor

Backports the following commits to 7.15:

* Made dashboard retain viewmode state in session. This means filters and query will be kept over reloads and navigations
@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Interpreter Functional Tests.test/interpreter_functional/test_suites/run_pipeline/esaggs_timeshift·ts.runPipeline esaggs timeshift tests shifts single percentile

Link to Jenkins

Standard Out

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

[00:00:00]     │
[00:00:00]       └-: runPipeline
[00:00:00]         └-> "before all" hook in "runPipeline"
[00:00:00]         └-> "before all" hook in "runPipeline"
[00:00:00]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Loading "mappings.json"
[00:00:00]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Loading "data.json.gz"
[00:00:00]           │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0]
[00:00:00]           │ info [o.e.c.r.a.AllocationService] [node-01] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:00:00]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Created index "logstash-2015.09.22"
[00:00:00]           │ debg [test/functional/fixtures/es_archiver/logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:00]           │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0]
[00:00:00]           │ info [o.e.c.r.a.AllocationService] [node-01] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:00:00]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Created index "logstash-2015.09.20"
[00:00:00]           │ debg [test/functional/fixtures/es_archiver/logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:00]           │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0]
[00:00:00]           │ info [o.e.c.r.a.AllocationService] [node-01] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:00:00]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Created index "logstash-2015.09.21"
[00:00:00]           │ debg [test/functional/fixtures/es_archiver/logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:10]           │ info progress: 9623
[00:00:13]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:13]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:13]           │ info [test/functional/fixtures/es_archiver/logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:13]           │ debg resolved import for test/functional/fixtures/kbn_archiver/visualize.json to /dev/shm/workspace/parallel/4/kibana/test/functional/fixtures/kbn_archiver/visualize.json
[00:00:13]           │ info importing 13 saved objects { space: undefined }
[00:00:13]           │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.15.1_001/XRaSMJmeSe6JdRHw599clA] update_mapping [_doc]
[00:00:13]           │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.15.1_001/XRaSMJmeSe6JdRHw599clA] update_mapping [_doc]
[00:00:14]           │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.15.1_001/XRaSMJmeSe6JdRHw599clA] update_mapping [_doc]
[00:00:14]           │ succ import success
[00:00:14]           │ debg replacing kibana config doc: {"dateFormat:tz":"Australia/North","defaultIndex":"logstash-*"}
[00:00:15]           │ debg navigating to settings url: http://localhost:6141/app/management
[00:00:15]           │ debg navigate to: http://localhost:6141/app/management
[00:00:15]           │ debg browser[INFO] http://localhost:6141/app/management?_t=1632758809772 281 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:00:15]           │
[00:00:15]           │ debg browser[INFO] http://localhost:6141/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:15]           │ debg ... sleep(700) start
[00:00:16]           │ debg ... sleep(700) end
[00:00:16]           │ debg returned from get, calling refresh
[00:00:17]           │ debg browser[INFO] http://localhost:6141/44114/bundles/core/core.entry.js 12:234752 "Plugin visTypeTable is using asynchronous setup lifecycle. Asynchronous plugins support will be removed in a later version."
[00:00:17]           │ debg browser[INFO] http://localhost:6141/app/management?_t=1632758809772 281 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:00:17]           │
[00:00:17]           │ debg browser[INFO] http://localhost:6141/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:17]           │ debg currentUrl = http://localhost:6141/app/management
[00:00:17]           │          appUrl = http://localhost:6141/app/management
[00:00:17]           │ debg TestSubjects.find(kibanaChrome)
[00:00:17]           │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:18]           │ debg browser[INFO] http://localhost:6141/44114/bundles/core/core.entry.js 12:234752 "Plugin visTypeTable is using asynchronous setup lifecycle. Asynchronous plugins support will be removed in a later version."
[00:00:18]           │ debg browser[INFO] http://localhost:6141/44114/bundles/core/core.entry.js 12:234752 "Plugin globalSearchBar is using asynchronous setup lifecycle. Asynchronous plugins support will be removed in a later version."
[00:00:19]           │ debg browser[DEBUG] http://localhost:6141/44114/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 463:131279 "Reporting user-agent."
[00:00:19]           │ debg ... sleep(501) start
[00:00:19]           │ debg ... sleep(501) end
[00:00:19]           │ debg in navigateTo url = http://localhost:6141/app/management
[00:00:19]           │ debg click "Run Pipeline" app link
[00:00:19]           │ debg TestSubjects.exists(collapsibleNav)
[00:00:19]           │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=2500
[00:00:22]           │ debg --- retry.tryForTime error: [data-test-subj="collapsibleNav"] is not displayed
[00:00:22]           │ debg TestSubjects.click(toggleNavButton)
[00:00:22]           │ debg Find.clickByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:00:22]           │ debg Find.findByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:00:23]           │ debg TestSubjects.find(collapsibleNav)
[00:00:23]           │ debg Find.findByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=10000
[00:00:23]           │ debg Find.existsByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=2500
[00:00:23]           │ debg browser[DEBUG] http://localhost:6141/44114/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 463:131279 "Reporting application usage for management, main"
[00:00:25]           │ debg TestSubjects.find(pluginContent)
[00:00:25]           │ debg Find.findByCssSelector('[data-test-subj="pluginContent"]') with timeout=10000
[00:00:39]         └-: esaggs timeshift tests
[00:00:39]           └-> "before all" hook for "shifts single metric"
[00:00:39]           └-> "before all" hook for "shifts single metric"
[00:00:39]           └-> shifts single metric
[00:00:39]             └-> "before each" hook: global before each for "shifts single metric"
[00:00:39]             │ debg executing expression 
[00:00:39]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='2015-09-22T00:00:00Z'}
[00:00:39]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:39]             │                aggs={aggCount id="1" enabled=true schema="metric" timeShift="1d"}
[00:00:39]             │              
[00:00:39]             │ debg running expression 
[00:00:39]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='2015-09-22T00:00:00Z'}
[00:00:39]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:39]             │                aggs={aggCount id="1" enabled=true schema="metric" timeShift="1d"}
[00:00:39]             │              
[00:00:39]             └- ✓ pass  (125ms) "runPipeline esaggs timeshift tests shifts single metric"
[00:00:39]           └-> shifts multiple metrics
[00:00:39]             └-> "before each" hook: global before each for "shifts multiple metrics"
[00:00:39]             │ debg executing expression 
[00:00:39]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='2015-09-22T00:00:00Z'}
[00:00:39]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:39]             │                aggs={aggCount id="1" enabled=true schema="metric" timeShift="12h"}
[00:00:39]             │                aggs={aggCount id="2" enabled=true schema="metric" timeShift="1d"}
[00:00:39]             │                aggs={aggCount id="3" enabled=true schema="metric"}
[00:00:39]             │              
[00:00:39]             │ debg running expression 
[00:00:39]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='2015-09-22T00:00:00Z'}
[00:00:39]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:39]             │                aggs={aggCount id="1" enabled=true schema="metric" timeShift="12h"}
[00:00:39]             │                aggs={aggCount id="2" enabled=true schema="metric" timeShift="1d"}
[00:00:39]             │                aggs={aggCount id="3" enabled=true schema="metric"}
[00:00:39]             │              
[00:00:40]             └- ✓ pass  (138ms) "runPipeline esaggs timeshift tests shifts multiple metrics"
[00:00:40]           └-> shifts multiple metrics with relative time range and previous
[00:00:40]             └-> "before each" hook: global before each for "shifts multiple metrics with relative time range and previous"
[00:00:40]             │ debg executing expression 
[00:00:40]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='now'}
[00:00:40]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:40]             │                aggs={aggCount id="1" enabled=true schema="metric"}
[00:00:40]             │                aggs={aggCount id="2" enabled=true schema="metric" timeShift="previous"}
[00:00:40]             │              
[00:00:40]             │ debg running expression 
[00:00:40]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='now'}
[00:00:40]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:40]             │                aggs={aggCount id="1" enabled=true schema="metric"}
[00:00:40]             │                aggs={aggCount id="2" enabled=true schema="metric" timeShift="previous"}
[00:00:40]             │              
[00:00:40]             └- ✓ pass  (132ms) "runPipeline esaggs timeshift tests shifts multiple metrics with relative time range and previous"
[00:00:40]           └-> shifts single percentile
[00:00:40]             └-> "before each" hook: global before each for "shifts single percentile"
[00:00:40]             │ debg executing expression 
[00:00:40]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='2015-09-22T00:00:00Z'}
[00:00:40]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:40]             │                aggs={aggSinglePercentile id="1" enabled=true schema="metric" field="bytes" percentile=95}
[00:00:40]             │                aggs={aggSinglePercentile id="2" enabled=true schema="metric" field="bytes" percentile=95 timeShift="1d"}
[00:00:40]             │              
[00:00:40]             │ debg running expression 
[00:00:40]             │                kibana_context timeRange={timerange from='2015-09-21T00:00:00Z' to='2015-09-22T00:00:00Z'}
[00:00:40]             │                | esaggs index={indexPatternLoad id='logstash-*'}
[00:00:40]             │                aggs={aggSinglePercentile id="1" enabled=true schema="metric" field="bytes" percentile=95}
[00:00:40]             │                aggs={aggSinglePercentile id="2" enabled=true schema="metric" field="bytes" percentile=95 timeShift="1d"}
[00:00:40]             │              
[00:00:40]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.async-search] creating index, cause [api], templates [], shards [1]/[0]
[00:00:40]             │ info [o.e.c.r.a.AllocationService] [node-01] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.async-search][0]]]).
[00:00:40]             │ info Taking screenshot "/dev/shm/workspace/parallel/4/kibana/test/interpreter_functional/screenshots/failure/runPipeline esaggs timeshift tests shifts single percentile.png"
[00:00:40]             │ info Current URL is: http://localhost:6141/app/kbn_tp_run_pipeline
[00:00:40]             │ info Saving page source to: /dev/shm/workspace/parallel/4/kibana/test/interpreter_functional/failure_debug/html/runPipeline esaggs timeshift tests shifts single percentile.html
[00:00:40]             └- ✖ fail: runPipeline esaggs timeshift tests shifts single percentile
[00:00:40]             │      TypeError: Cannot read property '0' of undefined
[00:00:40]             │       at getCell (test/interpreter_functional/test_suites/run_pipeline/esaggs_timeshift.ts:15:20)
[00:00:40]             │       at Context.<anonymous> (test/interpreter_functional/test_suites/run_pipeline/esaggs_timeshift.ts:101:14)
[00:00:40]             │       at runMicrotasks (<anonymous>)
[00:00:40]             │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:00:40]             │       at Object.apply (node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:00:40]             │ 
[00:00:40]             │ 

Stack Trace

TypeError: Cannot read property '0' of undefined
    at getCell (test/interpreter_functional/test_suites/run_pipeline/esaggs_timeshift.ts:15:20)
    at Context.<anonymous> (test/interpreter_functional/test_suites/run_pipeline/esaggs_timeshift.ts:101:14)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Object.apply (node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 223.2KB 223.2KB +4.0B

History

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

@ThomThomson ThomThomson merged commit 3b9a381 into elastic:7.15 Sep 27, 2021
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.

2 participants