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

[Lens] Keep the custom label when transitioning to/from Formula #114270

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Oct 7, 2021

Summary

Fixes #104574

This PR adds additional checks for the specific case of Formula (and other managed_references ops) transition, when the user has set a custom label to the current dimension.
Complimentary unit tests are bundled too.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@dej611 dej611 added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 Feature:Lens auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 labels Oct 7, 2021
@dej611
Copy link
Contributor Author

dej611 commented Oct 11, 2021

@elasticmachine merge upstream

@dej611 dej611 marked this pull request as ready for review October 11, 2021 08:27
@dej611 dej611 requested a review from a team as a code owner October 11, 2021 08:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors (Team:VisEditors)

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.

Tested and works as expected, LGTM. However I noticed the format is not carried over as well when going from formula to quick function. I guess we should pass in the formula column as previous column when calling hypotheticalLayer = insertNewColumn so buildColumn will be called with the right format passed in. Can be done in this PR or separately, but we should open another issue in this case.

@dej611
Copy link
Contributor Author

dej611 commented Oct 12, 2021

Sorted the problem with padding when temporary transitioning to Quick Functions from Formula.
I had a quick look at the issue but, from my understanding, there's an incompleteColumn cycle often that does not store the format data, hence the lost of it.
I've attempted some quick fix but probably it is better to reshape the IncompleteColumn to contain more information and perform a better investigation in another PR.

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome UI Functional Tests.test/functional/apps/discover/_indexpattern_without_timefield·ts.discover app indexpattern without timefield should switch between with and without timefield using the browser back button

Link to Jenkins

Standard Out

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

[00:00:00]     │
[00:07:19]       └-: discover app
[00:07:19]         └-> "before all" hook in "discover app"
[00:07:19]         └-> "before all" hook in "discover app"
[00:27:57]         └-: indexpattern without timefield
[00:27:57]           └-> "before all" hook for "should not display a timepicker"
[00:27:57]           └-> "before all" hook for "should not display a timepicker"
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Loading "mappings.json"
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Loading "data.json"
[00:27:57]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [without-timefield] creating index, cause [api], templates [], shards [1]/[0]
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Created index "without-timefield"
[00:27:57]             │ debg [test/functional/fixtures/es_archiver/index_pattern_without_timefield] "without-timefield" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:27:57]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [with-timefield] creating index, cause [api], templates [], shards [1]/[0]
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Created index "with-timefield"
[00:27:57]             │ debg [test/functional/fixtures/es_archiver/index_pattern_without_timefield] "with-timefield" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:27:57]             │ info [o.e.c.m.MetadataMappingService] [node-01] [without-timefield/SJ-ACLLOSsKCxPkcRCPhPg] create_mapping
[00:27:57]             │ info [o.e.c.m.MetadataMappingService] [node-01] [with-timefield/i_PD1hTDQNinKPT9ntpOTg] update_mapping [_doc]
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Indexed 1 docs into "without-timefield"
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Indexed 1 docs into "with-timefield"
[00:27:57]             │ info [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Indexed 2 docs into ".kibana"
[00:27:57]             │ debg Migrating saved objects
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.939+00:00][INFO ][savedobjects-service] [.kibana_task_manager] INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 3ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.942+00:00][INFO ][savedobjects-service] [.kibana] INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 7ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.943+00:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 4ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.944+00:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 2ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.948+00:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 5ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.951+00:00][INFO ][savedobjects-service] [.kibana] Starting to process 2 documents.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.951+00:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_TRANSFORM. took: 7ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.952+00:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 4ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.954+00:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_TRANSFORM -> TRANSFORMED_DOCUMENTS_BULK_INDEX. took: 3ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.958+00:00][INFO ][savedobjects-service] [.kibana] TRANSFORMED_DOCUMENTS_BULK_INDEX -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 4ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.962+00:00][INFO ][savedobjects-service] [.kibana_task_manager] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 10ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.965+00:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 7ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.967+00:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> OUTDATED_DOCUMENTS_REFRESH. took: 2ms.
[00:27:57]             │ info [o.e.t.LoggingTaskListener] [node-01] 27107 finished with response BulkByScrollResponse[took=13.3ms,timed_out=false,sliceId=null,updated=1,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:31.980+00:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_REFRESH -> UPDATE_TARGET_MAPPINGS. took: 13ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:32.029+00:00][INFO ][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 49ms.
[00:27:57]             │ info [o.e.t.LoggingTaskListener] [node-01] 27134 finished with response BulkByScrollResponse[took=30.9ms,timed_out=false,sliceId=null,updated=47,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:32.065+00:00][INFO ][savedobjects-service] [.kibana_task_manager] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE. took: 103ms.
[00:27:57]             │ proc [kibana] [2021-10-12T16:25:32.066+00:00][INFO ][savedobjects-service] [.kibana_task_manager] Migration completed after 130ms
[00:27:58]             │ proc [kibana] [2021-10-12T16:25:32.132+00:00][INFO ][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE. took: 103ms.
[00:27:58]             │ proc [kibana] [2021-10-12T16:25:32.133+00:00][INFO ][savedobjects-service] [.kibana] Migration completed after 198ms
[00:27:58]             │ debg [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Migrated Kibana index after loading Kibana data
[00:27:58]             │ debg [test/functional/fixtures/es_archiver/index_pattern_without_timefield] Ensured that default space exists in .kibana
[00:27:58]             │ debg replacing kibana config doc: {"defaultIndex":"without-timefield","timepicker:timeDefaults":"{  \"from\": \"2019-01-18T19:37:13.000Z\",  \"to\": \"now\"}"}
[00:27:58]             │ debg navigating to discover url: http://localhost:61201/app/discover#/
[00:27:58]             │ debg navigate to: http://localhost:61201/app/discover#/
[00:27:59]             │ debg browser[INFO] http://localhost:61201/app/discover?_t=1634055932962#/ 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:27:59]             │
[00:27:59]             │ debg browser[INFO] http://localhost:61201/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:27:59]             │ debg ... sleep(700) start
[00:28:00]             │ debg ... sleep(700) end
[00:28:00]             │ debg returned from get, calling refresh
[00:28:00]             │ debg browser[INFO] http://localhost:61201/app/discover?_t=1634055932962#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2019-01-18T19:37:13.000Z',to:now))&_a=(columns:!(),filters:!(),index:without-timefield,interval:auto,query:(language:kuery,query:''),sort:!()) 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:28:00]             │
[00:28:00]             │ debg browser[INFO] http://localhost:61201/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:28:00]             │ debg currentUrl = http://localhost:61201/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272019-01-18T19:37:13.000Z%27,to:now))&_a=(columns:!(),filters:!(),index:without-timefield,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:28:00]             │          appUrl = http://localhost:61201/app/discover#/
[00:28:00]             │ debg TestSubjects.find(kibanaChrome)
[00:28:00]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:28:00]             │ debg ... sleep(501) start
[00:28:01]             │ debg ... sleep(501) end
[00:28:01]             │ debg in navigateTo url = http://localhost:61201/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272019-01-18T19:37:13.000Z%27,to:now))&_a=(columns:!(),filters:!(),index:without-timefield,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:28:01]           └-> should not display a timepicker
[00:28:01]             └-> "before each" hook: global before each for "should not display a timepicker"
[00:28:01]             │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:28:01]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=2500
[00:28:04]             │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerToggleQuickMenuButton"] is not displayed
[00:28:04]             └- ✓ pass  (3.0s) "discover app indexpattern without timefield should not display a timepicker"
[00:28:04]           └-> should adapt sidebar fields when switching
[00:28:04]             └-> "before each" hook: global before each for "should adapt sidebar fields when switching"
[00:28:04]             │ debg TestSubjects.click(indexPattern-switch-link)
[00:28:04]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:04]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:04]             │ debg Find.setValue('[data-test-subj="indexPattern-switcher"] input', 'with-timefield')
[00:28:04]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] input') with timeout=10000
[00:28:04]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switcher"] [title="with-timefield"]') with timeout=10000
[00:28:04]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] [title="with-timefield"]') with timeout=10000
[00:28:05]             │ debg isGlobalLoadingIndicatorVisible
[00:28:05]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:28:05]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:28:06]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:28:07]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:28:07]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:28:07]             │ debg TestSubjects.exists(field-@timestamp)
[00:28:07]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="field-@timestamp"]') with timeout=2500
[00:28:07]             │ debg TestSubjects.click(indexPattern-switch-link)
[00:28:07]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:07]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:07]             │ debg Find.setValue('[data-test-subj="indexPattern-switcher"] input', 'without-timefield')
[00:28:07]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] input') with timeout=10000
[00:28:07]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switcher"] [title="without-timefield"]') with timeout=10000
[00:28:07]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] [title="without-timefield"]') with timeout=10000
[00:28:07]             │ debg isGlobalLoadingIndicatorVisible
[00:28:07]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:28:07]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:28:09]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:28:09]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:28:09]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:28:09]             │ debg Find.waitForAttributeToChange('[data-test-subj="discoverDocTable"]', 'data-render-complete', 'true')
[00:28:09]             │ debg Waiting up to 20000ms for data-render-complete to equal "true"...
[00:28:09]             │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:28:09]             │ debg TestSubjects.exists(field-@timestamp)
[00:28:09]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="field-@timestamp"]') with timeout=2500
[00:28:12]             │ debg --- retry.tryForTime error: [data-test-subj="field-@timestamp"] is not displayed
[00:28:12]             └- ✓ pass  (8.2s) "discover app indexpattern without timefield should adapt sidebar fields when switching"
[00:28:12]           └-> should display a timepicker after switching to an index pattern with timefield
[00:28:12]             └-> "before each" hook: global before each for "should display a timepicker after switching to an index pattern with timefield"
[00:28:12]             │ debg TestSubjects.click(indexPattern-switch-link)
[00:28:12]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:12]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:12]             │ debg Find.setValue('[data-test-subj="indexPattern-switcher"] input', 'with-timefield')
[00:28:12]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] input') with timeout=10000
[00:28:13]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switcher"] [title="with-timefield"]') with timeout=10000
[00:28:13]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] [title="with-timefield"]') with timeout=10000
[00:28:13]             │ debg isGlobalLoadingIndicatorVisible
[00:28:13]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:28:13]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:28:14]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:28:15]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:28:15]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:28:15]             │ debg Find.waitForAttributeToChange('[data-test-subj="discoverDocTable"]', 'data-render-complete', 'true')
[00:28:15]             │ debg Waiting up to 20000ms for data-render-complete to equal "true"...
[00:28:15]             │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:28:15]             │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:28:15]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=2500
[00:28:15]             └- ✓ pass  (2.5s) "discover app indexpattern without timefield should display a timepicker after switching to an index pattern with timefield"
[00:28:15]           └-> should switch between with and without timefield using the browser back button
[00:28:15]             └-> "before each" hook: global before each for "should switch between with and without timefield using the browser back button"
[00:28:15]             │ debg TestSubjects.click(indexPattern-switch-link)
[00:28:15]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:15]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:15]             │ debg Find.setValue('[data-test-subj="indexPattern-switcher"] input', 'without-timefield')
[00:28:15]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] input') with timeout=10000
[00:28:15]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switcher"] [title="without-timefield"]') with timeout=10000
[00:28:15]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] [title="without-timefield"]') with timeout=10000
[00:28:15]             │ debg isGlobalLoadingIndicatorVisible
[00:28:15]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:28:15]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:28:17]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:28:17]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:28:17]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:28:17]             │ debg Find.waitForAttributeToChange('[data-test-subj="discoverDocTable"]', 'data-render-complete', 'true')
[00:28:17]             │ debg Waiting up to 20000ms for data-render-complete to equal "true"...
[00:28:17]             │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:28:17]             │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:28:17]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=2500
[00:28:20]             │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerToggleQuickMenuButton"] is not displayed
[00:28:20]             │ debg TestSubjects.click(indexPattern-switch-link)
[00:28:20]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:20]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:20]             │ debg Find.setValue('[data-test-subj="indexPattern-switcher"] input', 'with-timefield')
[00:28:20]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] input') with timeout=10000
[00:28:21]             │ debg Find.clickByCssSelector('[data-test-subj="indexPattern-switcher"] [title="with-timefield"]') with timeout=10000
[00:28:21]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switcher"] [title="with-timefield"]') with timeout=10000
[00:28:21]             │ debg isGlobalLoadingIndicatorVisible
[00:28:21]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:28:21]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:28:22]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:28:23]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:28:23]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:28:23]             │ debg Find.waitForAttributeToChange('[data-test-subj="discoverDocTable"]', 'data-render-complete', 'true')
[00:28:23]             │ debg Waiting up to 20000ms for data-render-complete to equal "true"...
[00:28:23]             │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:28:23]             │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:28:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=2500
[00:28:23]             │ debg Find.waitForAttributeToChange('[data-test-subj="discoverDocTable"]', 'data-render-complete', 'true')
[00:28:23]             │ debg Waiting up to 20000ms for data-render-complete to equal "true"...
[00:28:23]             │ debg Find.findByCssSelector('[data-test-subj="discoverDocTable"]') with timeout=10000
[00:28:23]             │ debg Waiting up to 5000ms for index pattern to have been switched back to "without-timefield"...
[00:28:23]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:23]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:23]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:23]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:23]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:23]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:24]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:24]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:24]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:24]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:24]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:24]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:25]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:25]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:25]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:26]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:26]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:26]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:26]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:26]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:26]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:27]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:27]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:27]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:27]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:27]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:27]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:28]             │ debg TestSubjects.getVisibleText(indexPattern-switch-link)
[00:28:28]             │ debg TestSubjects.find(indexPattern-switch-link)
[00:28:28]             │ debg Find.findByCssSelector('[data-test-subj="indexPattern-switch-link"]') with timeout=10000
[00:28:28]             │ info Taking screenshot "/dev/shm/workspace/parallel/20/kibana/test/functional/screenshots/failure/discover app indexpattern without timefield should switch between with and without timefield using the browser back button.png"
[00:28:28]             │ info Current URL is: http://localhost:61201/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272019-01-18T19:37:13.000Z%27,to:now))&_a=(columns:!(),filters:!(),index:without-timefield,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:28:28]             │ info Saving page source to: /dev/shm/workspace/parallel/20/kibana/test/functional/failure_debug/html/discover app indexpattern without timefield should switch between with and without timefield using the browser back button.html
[00:28:28]             └- ✖ fail: discover app indexpattern without timefield should switch between with and without timefield using the browser back button
[00:28:28]             │      Error: timed out waiting for index pattern to have been switched back to "without-timefield"
[00:28:28]             │       at onFailure (test/common/services/retry/retry_for_truthy.ts:39:13)
[00:28:28]             │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:59:13)
[00:28:28]             │       at retryForTruthy (test/common/services/retry/retry_for_truthy.ts:27:3)
[00:28:28]             │       at RetryService.waitForWithTimeout (test/common/services/retry/retry.ts:45:5)
[00:28:28]             │       at Context.<anonymous> (test/functional/apps/discover/_indexpattern_without_timefield.ts:80:7)
[00:28:28]             │       at Object.apply (node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:28:28]             │ 
[00:28:28]             │ 

Stack Trace

Error: timed out waiting for index pattern to have been switched back to "without-timefield"
    at onFailure (test/common/services/retry/retry_for_truthy.ts:39:13)
    at retryForSuccess (test/common/services/retry/retry_for_success.ts:59:13)
    at retryForTruthy (test/common/services/retry/retry_for_truthy.ts:27:3)
    at RetryService.waitForWithTimeout (test/common/services/retry/retry.ts:45:5)
    at Context.<anonymous> (test/functional/apps/discover/_indexpattern_without_timefield.ts:80:7)
    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
lens 1.0MB 1.0MB +234.0B

History

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

@dej611 dej611 merged commit aad4771 into elastic:master Oct 13, 2021
@dej611 dej611 deleted the fix/104574-2 branch October 13, 2021 08:10
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Oct 13, 2021
…tic#114270)

* 🐛 Keep the custom label when transitioning to/from Formula

* 🐛 Fix transition bug with padding

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Oct 13, 2021
) (#114761)

* 🐛 Keep the custom label when transitioning to/from Formula

* 🐛 Fix transition bug with padding

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 13, 2021
…ide-users-to-saving-ux

* 'master' of github.com:elastic/kibana: (133 commits)
  [DOCS] Indicate reports are a subscription feature (elastic#114653)
  Update namespace for indices (elastic#114612)
  [DOCS] Adds Logstash pipeline settings (elastic#114648)
  Bump EPR snapshot version used for tests (elastic#114529)
  [Security Solution] [Endpoint] Fleet summary card adjustments (elastic#114291)
  skip flaky suite (elastic#68400)
  [Visualizations] fix usage of optional dependencies (elastic#114286)
  [Security Solution] [Detections] Improves custom query rule upgrade test (elastic#114454)
  [fleet] Add Integration Preference selector (elastic#114432)
  [Reporting] Add new `data-render-error` attribute (elastic#114472)
  Replace EuiCodeEditor with CodeEditor in app-services code (elastic#114316)
  [data views] add getDefaultDataView method  (elastic#113891)
  [Security Solution] [Endpoint] Event filters uses the new card design (elastic#114126)
  [fleet] Tweak Header UI (elastic#114704)
  [APM] Filter on tx metrics for instance stats (elastic#114758)
  [APM] Fix typo in linting docs (elastic#114764)
  [Discover] Removing SavedObject usage for savedSearch (elastic#112983)
  [Fleet] Add Integration Policy Page Improvements (elastic#114556)
  [Lens] Keep the custom label when transitioning to/from Formula (elastic#114270)
  [Security Solution][Endpoint] Host Isolation API changes (elastic#113621)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Clicking the formula tab overwrites the custom display name
4 participants