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.x] [Snapshot Restore] fix snapshot and repository endpoints to align with ES API #60508

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

alisonelizabeth
Copy link
Contributor

@alisonelizabeth alisonelizabeth commented Mar 18, 2020

This PR fixes a regression caused by the 7.x backport PR of SR NP migration: #59520.

There are differences between master and 7.x branches for the snapshot and repository API endpoint handlers due to breaking changes in ES snapshot APIs. More details here: #39533.

How to test

  • Create a policy, and execute it. Verify a snapshot appears under the "Snapshots" tab

Screen Shot 2020-03-18 at 9 31 45 AM

  • Verify the repository details panel includes the correct snapshot count.

Screen Shot 2020-03-18 at 9 31 53 AM

@alisonelizabeth alisonelizabeth added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI v7.7.0 labels Mar 18, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/discover·ts.Discover Load a new search from the panel

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: Discover
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ info [discover] Loading "mappings.json"
[00:00:00]             │ info [discover] Loading "data.json.gz"
[00:00:00]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_1/4v-ZqxCITdCEhP1f3Sublg] deleting index
[00:00:00]             │ info [discover] Deleted existing index [".kibana_1"]
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [discover] Created index ".kibana"
[00:00:00]             │ debg [discover] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:00]             │ info [discover] Indexed 2 docs into ".kibana"
[00:00:00]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana/VxCJUZE0SGaP7XAZlCPW7Q] update_mapping [_doc]
[00:00:00]             │ debg Migrating saved objects
[00:00:00]             │ proc [kibana]   log   [13:57:37.600] [info][savedobjects-service] Creating index .kibana_2.
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:00]             │ proc [kibana]   log   [13:57:37.761] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [task]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] updating number_of_replicas to [0] for indices [.tasks]
[00:00:01]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] 104 finished with response BulkByScrollResponse[took=126.4ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:01]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana/VxCJUZE0SGaP7XAZlCPW7Q] deleting index
[00:00:01]             │ proc [kibana]   log   [13:57:38.264] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:00:01]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_2/tGTmFqKzSrC85CwcbVqM7A] update_mapping [_doc]
[00:00:01]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_2/tGTmFqKzSrC85CwcbVqM7A] update_mapping [_doc]
[00:00:01]             │ proc [kibana]   log   [13:57:38.420] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:00:01]             │ proc [kibana]   log   [13:57:38.489] [info][savedobjects-service] Finished in 893ms.
[00:00:01]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:01]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_2/tGTmFqKzSrC85CwcbVqM7A] update_mapping [_doc]
[00:00:02]             │ info [logstash_functional] Loading "mappings.json"
[00:00:02]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:02]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:00:02]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:02]             │ debg [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:02]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:00:02]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:02]             │ debg [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:02]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:00:02]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:02]             │ debg [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:12]             │ info progress: 5062
[00:00:22]             │ info progress: 12036
[00:00:24]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:24]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:24]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:25]             │ debg applying update to kibana config: {"defaultIndex":"logstash-*"}
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1584538436413854842] [.kibana_2/tGTmFqKzSrC85CwcbVqM7A] update_mapping [_doc]
[00:00:25]             │ debg navigating to discover url: http://localhost:61131/app/kibana#/discover
[00:00:25]             │ debg Navigate to: http://localhost:61131/app/kibana#/discover
[00:00:26]             │ debg ... sleep(700) start
[00:00:26]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1584539882789#/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:00:26]             │
[00:00:26]             │ debg browser[INFO] http://localhost:61131/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:26]             │ debg ... sleep(700) end
[00:00:26]             │ debg returned from get, calling refresh
[00:00:28]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1584539882789#/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:00:28]             │
[00:00:28]             │ debg browser[INFO] http://localhost:61131/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:28]             │ debg currentUrl = http://localhost:61131/app/kibana#/discover
[00:00:28]             │          appUrl = http://localhost:61131/app/kibana#/discover
[00:00:28]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:32]             │ debg browser[INFO] http://localhost:61131/bundles/plugin/data/data.plugin.js 96:139970 "INFO: 2020-03-18T13:58:09Z
[00:00:32]             │        Adding connection to http://localhost:61131/elasticsearch
[00:00:32]             │
[00:00:32]             │      "
[00:00:34]             │ debg TestSubjects.find(kibanaChrome)
[00:00:34]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:34]             │ debg ... sleep(501) start
[00:00:34]             │ debg ... sleep(501) end
[00:00:34]             │ debg in navigateTo url = http://localhost:61131/app/kibana#/discover
[00:00:34]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:34]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:37]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:37]             │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:00:37]             │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:00:37]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:00:37]             │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:00:37]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:00:37]             │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:00:37]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:00:37]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:00:38]             │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:00:38]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:00:38]             │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:00:38]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:00:38]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:00:38]             │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:00:38]             │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:00:38]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:38]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:38]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:38]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:38]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:39]             │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:00:39]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:39]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:39]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:40]             │ debg ... sleep(500) start
[00:00:40]             │ debg ... sleep(500) end
[00:00:40]             │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:00:40]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:00:40]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:00:40]             │ debg Find.waitForElementStale with timeout=10000
[00:00:41]             │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:00:41]             │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:00:41]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:41]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:41]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:41]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:41]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:41]             │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:00:41]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:41]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:41]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:42]             │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:00:42]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:00:45]             │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:00:45]             │ debg TestSubjects.click(querySubmitButton)
[00:00:45]             │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:00:45]             │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:00:46]             │ debg Find.waitForElementStale with timeout=10000
[00:00:46]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:46]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:46]           └-> main view
[00:00:46]             └-> "before each" hook: global before each
[00:00:47]             └- ✓ pass  (1.2s) "Discover main view"
[00:00:47]           └-> Click save button
[00:00:47]             └-> "before each" hook: global before each
[00:00:47]             │ debg TestSubjects.click(discoverSaveButton)
[00:00:47]             │ debg Find.clickByCssSelector('[data-test-subj="discoverSaveButton"]') with timeout=10000
[00:00:47]             │ debg Find.findByCssSelector('[data-test-subj="discoverSaveButton"]') with timeout=10000
[00:01:08]             └- ✓ pass  (20.8s) "Discover Click save button"
[00:01:08]           └-> Save search panel
[00:01:08]             └-> "before each" hook: global before each
[00:01:08]             │ debg TestSubjects.setValue(savedObjectTitle, a11ySearch)
[00:01:08]             │ debg TestSubjects.click(savedObjectTitle)
[00:01:08]             │ debg Find.clickByCssSelector('[data-test-subj="savedObjectTitle"]') with timeout=10000
[00:01:08]             │ debg Find.findByCssSelector('[data-test-subj="savedObjectTitle"]') with timeout=10000
[00:01:31]             └- ✓ pass  (23.4s) "Discover Save search panel"
[00:01:31]           └-> Confirm saved search
[00:01:31]             └-> "before each" hook: global before each
[00:01:31]             │ debg TestSubjects.click(confirmSaveSavedObjectButton)
[00:01:31]             │ debg Find.clickByCssSelector('[data-test-subj="confirmSaveSavedObjectButton"]') with timeout=10000
[00:01:31]             │ debg Find.findByCssSelector('[data-test-subj="confirmSaveSavedObjectButton"]') with timeout=10000
[00:01:57]             └- ✓ pass  (25.4s) "Discover Confirm saved search"
[00:01:57]           └-> Click on new to clear the search
[00:01:57]           └-> Open load saved search panel
[00:01:57]             └-> "before each" hook: global before each
[00:01:57]             │ debg TestSubjects.exists(loadSearchForm)
[00:01:57]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadSearchForm"]') with timeout=2500
[00:02:01]             │ debg --- retry.tryForTime error: [data-test-subj="loadSearchForm"] is not displayed
[00:02:01]             │ debg TestSubjects.moveMouseTo(discoverOpenButton)
[00:02:01]             │ debg TestSubjects.find(discoverOpenButton)
[00:02:01]             │ debg Find.findByCssSelector('[data-test-subj="discoverOpenButton"]') with timeout=10000
[00:02:01]             │ debg TestSubjects.click(discoverOpenButton)
[00:02:01]             │ debg Find.clickByCssSelector('[data-test-subj="discoverOpenButton"]') with timeout=10000
[00:02:01]             │ debg Find.findByCssSelector('[data-test-subj="discoverOpenButton"]') with timeout=10000
[00:02:02]             │ debg isGlobalLoadingIndicatorVisible
[00:02:02]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:02:02]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:02:02]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:02:02]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:02:03]             │ debg TestSubjects.exists(loadSearchForm)
[00:02:03]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadSearchForm"]') with timeout=2500
[00:02:29]             │ debg TestSubjects.click(euiFlyoutCloseButton)
[00:02:29]             │ debg Find.clickByCssSelector('[data-test-subj="euiFlyoutCloseButton"]') with timeout=10000
[00:02:29]             │ debg Find.findByCssSelector('[data-test-subj="euiFlyoutCloseButton"]') with timeout=10000
[00:02:30]             └- ✓ pass  (32.6s) "Discover Open load saved search panel"
[00:02:30]           └-> Open inspector panel
[00:02:30]             └-> "before each" hook: global before each
[00:02:30]             │ debg Inspector.open
[00:02:30]             │ debg TestSubjects.exists(inspectorPanel)
[00:02:30]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=2500
[00:02:32]             │ debg --- retry.tryForTime error: [data-test-subj="inspectorPanel"] is not displayed
[00:02:33]             │ debg TestSubjects.click(openInspectorButton)
[00:02:33]             │ debg Find.clickByCssSelector('[data-test-subj="openInspectorButton"]') with timeout=10000
[00:02:33]             │ debg Find.findByCssSelector('[data-test-subj="openInspectorButton"]') with timeout=10000
[00:02:33]             │ debg TestSubjects.exists(inspectorPanel)
[00:02:33]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=2500
[00:02:59]             │ debg Close Inspector
[00:02:59]             │ debg TestSubjects.exists(inspectorPanel)
[00:02:59]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=2500
[00:03:00]             │ debg Closing flyout inspectorPanel
[00:03:00]             │ debg TestSubjects.find(inspectorPanel)
[00:03:00]             │ debg Find.findByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=10000
[00:03:00]             │ debg Waiting up to 20000ms for flyout closed...
[00:03:00]             │ debg TestSubjects.exists(inspectorPanel)
[00:03:00]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=1000
[00:03:01]             │ debg --- retry.tryForTime error: [data-test-subj="inspectorPanel"] is not displayed
[00:03:01]             │ debg TestSubjects.exists(inspectorPanel)
[00:03:01]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=2500
[00:03:04]             │ debg --- retry.tryForTime error: [data-test-subj="inspectorPanel"] is not displayed
[00:03:04]             └- ✓ pass  (34.8s) "Discover Open inspector panel"
[00:03:04]           └-> Open add filter
[00:03:04]             └-> "before each" hook: global before each
[00:03:04]             │ debg TestSubjects.click(addFilter)
[00:03:04]             │ debg Find.clickByCssSelector('[data-test-subj="addFilter"]') with timeout=10000
[00:03:04]             │ debg Find.findByCssSelector('[data-test-subj="addFilter"]') with timeout=10000
[00:03:28]             └- ✓ pass  (23.5s) "Discover Open add filter"
[00:03:28]           └-> Select values for a filter
[00:03:28]             └-> "before each" hook: global before each
[00:03:28]             │ debg TestSubjects.click(addFilter)
[00:03:28]             │ debg Find.clickByCssSelector('[data-test-subj="addFilter"]') with timeout=10000
[00:03:28]             │ debg Find.findByCssSelector('[data-test-subj="addFilter"]') with timeout=10000
[00:03:28]             │ debg comboBox.set, comboBoxSelector: filterFieldSuggestionList
[00:03:28]             │ debg TestSubjects.find(filterFieldSuggestionList)
[00:03:28]             │ debg Find.findByCssSelector('[data-test-subj="filterFieldSuggestionList"]') with timeout=10000
[00:03:28]             │ debg comboBox.setElement, value: extension.raw
[00:03:28]             │ debg comboBox.isOptionSelected, value: extension.raw
[00:03:32]             │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:03:32]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:03:32]             │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="extension.raw"]') with timeout=2500
[00:03:33]             │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:03:33]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:03:35]             │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:03:36]             │ debg comboBox.set, comboBoxSelector: filterOperatorList
[00:03:36]             │ debg TestSubjects.find(filterOperatorList)
[00:03:36]             │ debg Find.findByCssSelector('[data-test-subj="filterOperatorList"]') with timeout=10000
[00:03:36]             │ debg comboBox.setElement, value: is one of
[00:03:36]             │ debg comboBox.isOptionSelected, value: is one of
[00:03:40]             │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:03:40]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:03:40]             │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="is one of"]') with timeout=2500
[00:03:41]             │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:03:41]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:03:43]             │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:03:44]             │ debg TestSubjects.find(filterParams)
[00:03:44]             │ debg Find.findByCssSelector('[data-test-subj="filterParams"]') with timeout=10000
[00:03:44]             │ debg comboBox.setElement, value: jpg
[00:03:44]             │ debg comboBox.isOptionSelected, value: jpg
[00:03:47]             │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:03:47]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:03:47]             │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="jpg"]') with timeout=2500
[00:03:48]             │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:03:48]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:03:48]             │ debg TestSubjects.click(saveFilter)
[00:03:48]             │ debg Find.clickByCssSelector('[data-test-subj="saveFilter"]') with timeout=10000
[00:03:48]             │ debg Find.findByCssSelector('[data-test-subj="saveFilter"]') with timeout=10000
[00:03:49]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:49]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:04:16]             └- ✓ pass  (47.7s) "Discover Select values for a filter"
[00:04:16]           └-> Load a new search from the panel
[00:04:16]             └-> "before each" hook: global before each
[00:04:16]             │ debg TestSubjects.click(discoverSaveButton)
[00:04:16]             │ debg Find.clickByCssSelector('[data-test-subj="discoverSaveButton"]') with timeout=10000
[00:04:16]             │ debg Find.findByCssSelector('[data-test-subj="discoverSaveButton"]') with timeout=10000
[00:04:16]             │ debg TestSubjects.setValue(savedObjectTitle, filterSearch)
[00:04:16]             │ debg TestSubjects.click(savedObjectTitle)
[00:04:16]             │ debg Find.clickByCssSelector('[data-test-subj="savedObjectTitle"]') with timeout=10000
[00:04:16]             │ debg Find.findByCssSelector('[data-test-subj="savedObjectTitle"]') with timeout=10000
[00:04:17]             │ debg TestSubjects.click(confirmSaveSavedObjectButton)
[00:04:17]             │ debg Find.clickByCssSelector('[data-test-subj="confirmSaveSavedObjectButton"]') with timeout=10000
[00:04:17]             │ debg Find.findByCssSelector('[data-test-subj="confirmSaveSavedObjectButton"]') with timeout=10000
[00:04:17]             │ debg TestSubjects.exists(loadSearchForm)
[00:04:17]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadSearchForm"]') with timeout=2500
[00:04:20]             │ERROR browser[SEVERE] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 367:78758 TypeError: Cannot read property 'change' of undefined
[00:04:20]             │          at http://localhost:61131/bundles/8.bundle.js:1:32566
[00:04:20]             │          at u.$digest (http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:100155)
[00:04:20]             │          at http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:102127
[00:04:20]             │          at Yo.completeTask (http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:122692)
[00:04:20]             │          at http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:34257
[00:04:20]             │ debg --- retry.tryForTime error: [data-test-subj="loadSearchForm"] is not displayed
[00:04:20]             │ debg TestSubjects.moveMouseTo(discoverOpenButton)
[00:04:20]             │ debg TestSubjects.find(discoverOpenButton)
[00:04:20]             │ debg Find.findByCssSelector('[data-test-subj="discoverOpenButton"]') with timeout=10000
[00:04:20]             │ debg TestSubjects.click(discoverOpenButton)
[00:04:20]             │ debg Find.clickByCssSelector('[data-test-subj="discoverOpenButton"]') with timeout=10000
[00:04:20]             │ debg Find.findByCssSelector('[data-test-subj="discoverOpenButton"]') with timeout=10000
[00:04:21]             │ debg isGlobalLoadingIndicatorVisible
[00:04:21]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:04:21]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:04:23]             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:04:23]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:04:23]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:04:23]             │ debg TestSubjects.exists(loadSearchForm)
[00:04:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadSearchForm"]') with timeout=2500
[00:04:23]             │ debg TestSubjects.exists(loadSearchForm)
[00:04:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadSearchForm"]') with timeout=2500
[00:04:23]             │ debg Find.byButtonText('filterSearch') with timeout=10000
[00:04:33]             │ debg --- retry.tryForTime error: stale element reference: element is not attached to the page document
[00:04:33]             │        (Session info: headless chrome=80.0.3987.149)
[00:04:33]             │        (Driver info: chromedriver=80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}),platform=Linux 4.15.0-1058-gcp x86_64)
[00:04:34]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Discover Load a new search from the panel.png"
[00:04:34]             │ info Current URL is: http://localhost:61131/app/kibana#/discover/a7f12490-6920-11ea-855e-1dcb06307ca2?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(columns:!(_source),filters:!((%27$state%27:(store:appState),meta:(alias:!n,disabled:!f,index:%27logstash-*%27,key:extension.raw,negate:!f,params:!(jpg),type:phrases,value:jpg),query:(bool:(minimum_should_match:1,should:!((match_phrase:(extension.raw:jpg))))))),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:04:34]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Discover Load a new search from the panel.html
[00:04:34]             └- ✖ fail: "Discover Load a new search from the panel"
[00:04:34]             │

Stack Trace

Error: retry.tryForTime timeout: StaleElementReferenceError: stale element reference: element is not attached to the page document
  (Session info: headless chrome=80.0.3987.149)
  (Driver info: chromedriver=80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}),platform=Linux 4.15.0-1058-gcp x86_64)
    at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:585:15)
    at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:554:13)
    at Executor.execute (node_modules/selenium-webdriver/lib/http.js:489:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at onFailure (test/common/services/retry/retry_for_success.ts:28:9)
    at retryForSuccess (test/common/services/retry/retry_for_success.ts:68:13)

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

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Tested locally and verified expected behavior of fetching all repositories, all snapshots, and individual snapshots. Code also looks good. I compared it to the reference PR and it looks like everything is mirrored.

@sebelga
Copy link
Contributor

sebelga commented Mar 19, 2020

Great catch @alisonelizabeth ! 👍

I wonder how we could avoid this (big) mistake. Let's discuss it at our next sync because it might/will happen again. I am thinking about the mappings editor and difference of logic master / 7.x, this here in S&R, and maybe other places.

How do we communicate in a central place apps that can be freely backported (no diffs between major versions) and apps that have different logic and thus the backport (maybe) needs to be manual.

@alisonelizabeth alisonelizabeth merged commit a8c6147 into elastic:7.x Mar 19, 2020
@alisonelizabeth alisonelizabeth deleted the bugfix/7.x/sr branch March 19, 2020 12:28
@cjcenizal
Copy link
Contributor

@sebelga I think an end-to-end test would have caught this, right? We could have tested the UI's dependency upon the ES APIs in question. By consuming the real ES APIs in 7.x, we would have seen the backport fail CI because the client would have expected a different API than what was provided.

@cjcenizal
Copy link
Contributor

I think we could supplement these tests by also supporting both the 7.x and 8.0 forms in both 7.x and master, as Brandon suggests in this conversation (it's a good read): #52866 (comment).

The tests will alert us of a problem, but the problems will be much less likely to occur in the first place. I also like the consistent pattern of branching logic on the stack version. It gives us something reliable to grep for when looking for these types of divergences and it makes the divergence it very obvious to anyone who is skimming the code.

@sebelga
Copy link
Contributor

sebelga commented Mar 20, 2020

I am not sure I follow you 😄 This is worth a zoom I guess.
S&R does not have API integration tests. If it did, I.think they would have caught the bug when creating the backport. So not sure that e2e was needed, but API integration tests are a must.
The complexity of this app is the settings (and plugins) needed in ES to run the tests and I think this is why we don't have integration tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants