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

[Upgrade Assistant] Batch reindex docs #112960

Merged
merged 7 commits into from
Sep 28, 2021

Conversation

yuliacech
Copy link
Contributor

@yuliacech yuliacech commented Sep 23, 2021

Summary

This PR adds a link to Kibana batch reindex API to the ES deprecations page. This could be helpful for users that have a lot of indices that need to be reindexed and clicking each one in the UI might be tiring for them. They could use "batch reindex" API via Dev Tools console.
The Kibana batch reindexing page now links to Kibana reindex that also links out to ES reindex page.
I also added a list of steps that happen during the Kibana reindex task and renamed "reindexing operation" on one page to "reindexing task" for consistency with other pages. Also the "experimental" callout is now the same on all UA docs pages.

Screenshot

Screenshot 2021-09-27 at 12 42 40

Checklist

…ded a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.
@yuliacech yuliacech 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:Upgrade Assistant v7.16.0 labels Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@@ -6,7 +6,7 @@

experimental["The underlying Upgrade Assistant concepts are stable, but the APIs for managing Upgrade Assistant are experimental."]

Start or resume multiple reindexing tasks in one request. Additionally, reindexing tasks started or resumed
Start or resume multiple <<start-resume-reindex, reindexing>> tasks in one request. Additionally, reindexing tasks started or resumed
Copy link
Contributor Author

@yuliacech yuliacech Sep 23, 2021

Choose a reason for hiding this comment

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

This should link to the Kibana Start or resume reindex API page

@@ -76,7 +76,7 @@ Similar to the <<start-resume-reindex, start or resume endpoint>>, the API retur
}
--------------------------------------------------

<1> A list of reindex operations created, the order in the array indicates the order in which tasks will be executed.
<1> A list of reindex tasks created, the order in the array indicates the order in which tasks will be executed.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing wording for consistency, as we use "task" everywhere else.

. Creating a new index
. {ref}/docs-reindex.html[Reindexing] documents into the new index
. Creating an index alias for the new index
. Deleting the old index
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This list doesn't contain 2 steps: stopping and starting "index group services, only applies to some indices" which happens for ml and watcher indices. This code will be removed from UA this release because system indices will have their own separate deprecation resolution process.

<4> The task ID of the reindex task in {es}. Appears when the reindexing starts.
<5> The progress of the reindexing task in {es}. Appears in decimal form, from 0 to 1.
<4> The task ID of the {ref}/docs-reindex.html[reindex] task in {es}. Appears when the reindexing starts.
<5> The progress of the {ref}/docs-reindex.html[reindexing] task in {es}. Appears in decimal form, from 0 to 1.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should link out to ES Reindex API page

@yuliacech yuliacech requested a review from jrodewig September 23, 2021 12:39
@jrodewig
Copy link
Contributor

@elasticmachine run elasticsearch-ci/docs

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together, @yuliacech! It looks great for the most part.

I left a few bits of feedback. Ping me once that's addressed, and I'll take another look.

Comment on lines 7 to 9
experimental[] Start a new reindex or resume a paused reindex.

Start a new reindex or resume a paused reindex.
Start a new reindex or resume a paused reindex. Following steps are performed during
Copy link
Contributor

Choose a reason for hiding this comment

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

The Start a new reindex... sentence is duplicated. I think we also want to retain the experimental[] tag.

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

Thanks for making these changes @yuliacech! code lgtm, didn't test locally

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Contributor Author

Thank you for the review, @sabarasaba!

@yuliacech
Copy link
Contributor Author

Thanks a lot for your review and the suggestions, @jrodewig!
I updated the ES deprecations page wording as you suggested and fixed the "experimental" tag on the docs pages. Could you please have another look?

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Performance Tests.x-pack/test/performance/tests/reporting_dashboard·ts.performance reporting dashbaord downloaded PDF has OK status

Link to Jenkins

Standard Out

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

[00:00:00]                     │
[00:00:00]                       └-: performance
[00:00:00]                         └-> "before all" hook in "performance"
[00:00:00]                         └-: reporting dashbaord
[00:00:00]                           └-> "before all" hook for "downloaded PDF has OK status"
[00:00:00]                           └-> "before all" hook for "downloaded PDF has OK status"
[00:00:00]                             │ debg resolved import for x-pack/test/performance/kbn_archives/reporting_dashboard to /dev/shm/workspace/parallel/11/kibana/x-pack/test/performance/kbn_archives/reporting_dashboard.json
[00:00:00]                             │ info importing 4 saved objects { space: undefined }
[00:00:00]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:00]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:00]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:00]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:00]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:01]                             │ succ import success
[00:00:01]                             │ info [x-pack/test/performance/es_archives/reporting_dashboard] Loading "mappings.json"
[00:00:01]                             │ info [x-pack/test/performance/es_archives/reporting_dashboard] Loading "data.json.gz"
[00:00:01]                             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [foo] creating index, cause [api], templates [], shards [1]/[1]
[00:00:01]                             │ info [x-pack/test/performance/es_archives/reporting_dashboard] Created index "foo"
[00:00:01]                             │ debg [x-pack/test/performance/es_archives/reporting_dashboard] "foo" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:03]                             │ info [x-pack/test/performance/es_archives/reporting_dashboard] Indexed 10000 docs into "foo"
[00:00:03]                           └-> downloaded PDF has OK status
[00:00:03]                             └-> "before each" hook: global before each for "downloaded PDF has OK status"
[00:00:03]                             │ debg navigating to dashboards url: http://localhost:61111/app/dashboards
[00:00:03]                             │ debg navigate to: http://localhost:61111/app/dashboards
[00:00:03]                             │ debg browser[INFO] http://localhost:61111/login?next=%2Fapp%2Fdashboards%3F_t%3D1632744717033 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:03]                             │
[00:00:03]                             │ debg browser[INFO] http://localhost:61111/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:03]                             │ debg ... sleep(700) start
[00:00:04]                             │ debg ... sleep(700) end
[00:00:04]                             │ debg returned from get, calling refresh
[00:00:05]                             │ debg browser[INFO] http://localhost:61111/login?next=%2Fapp%2Fdashboards%3F_t%3D1632744717033 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:05]                             │
[00:00:05]                             │ debg browser[INFO] http://localhost:61111/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:06]                             │ debg currentUrl = http://localhost:61111/login?next=%2Fapp%2Fdashboards%3F_t%3D1632744717033
[00:00:06]                             │          appUrl = http://localhost:61111/app/dashboards
[00:00:06]                             │ debg TestSubjects.find(kibanaChrome)
[00:00:06]                             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:06]                             │ debg Found login page
[00:00:06]                             │ debg TestSubjects.setValue(loginUsername, test_user)
[00:00:06]                             │ debg TestSubjects.click(loginUsername)
[00:00:06]                             │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:06]                             │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:06]                             │ERROR browser[SEVERE] http://localhost:61111/api/licensing/info - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:00:07]                             │ debg TestSubjects.setValue(loginPassword, changeme)
[00:00:07]                             │ debg TestSubjects.click(loginPassword)
[00:00:07]                             │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:07]                             │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:07]                             │ debg TestSubjects.click(loginSubmit)
[00:00:07]                             │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:07]                             │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:07]                             │ debg Find.waitForDeletedByCssSelector('.kibanaWelcomeLogo') with timeout=10000
[00:00:07]                             │ proc [kibana]   log   [12:12:00.942] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:00:08]                             │ debg browser[INFO] http://localhost:61111/app/dashboards?_t=1632744717033 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:08]                             │
[00:00:08]                             │ debg browser[INFO] http://localhost:61111/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:08]                             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:09]                             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide)') with timeout=60000
[00:00:11]                             │ debg browser[INFO] http://localhost:61111/app/dashboards?_t=1632744723597 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:11]                             │
[00:00:11]                             │ debg browser[INFO] http://localhost:61111/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:11]                             │ debg Finished login process currentUrl = http://localhost:61111/app/dashboards
[00:00:11]                             │ debg ... sleep(501) start
[00:00:12]                             │ debg ... sleep(501) end
[00:00:12]                             │ debg in navigateTo url = http://localhost:61111/app/dashboards
[00:00:12]                             │ debg Waiting up to 20000ms for dashboard landing page...
[00:00:12]                             │ debg onDashboardLandingPage
[00:00:12]                             │ debg TestSubjects.exists(dashboardLandingPage)
[00:00:12]                             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardLandingPage"]') with timeout=5000
[00:00:12]                             │ debg Load Saved Dashboard dashboard
[00:00:12]                             │ debg gotoDashboardLandingPage
[00:00:12]                             │ debg onDashboardLandingPage
[00:00:12]                             │ debg TestSubjects.exists(dashboardLandingPage)
[00:00:12]                             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardLandingPage"]') with timeout=5000
[00:00:12]                             │ debg searchForItemWithName: dashboard
[00:00:12]                             │ debg TestSubjects.find(tableListSearchBox)
[00:00:12]                             │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:00:13]                             │ debg isGlobalLoadingIndicatorVisible
[00:00:13]                             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:00:13]                             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:00:13]                             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:13]                             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:14]                             │ debg TestSubjects.click(dashboardListingTitleLink-dashboard)
[00:00:14]                             │ debg Find.clickByCssSelector('[data-test-subj="dashboardListingTitleLink-dashboard"]') with timeout=10000
[00:00:14]                             │ debg Find.findByCssSelector('[data-test-subj="dashboardListingTitleLink-dashboard"]') with timeout=10000
[00:00:14]                             │ debg isGlobalLoadingIndicatorVisible
[00:00:14]                             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:00:14]                             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:00:14]                             │ debg browser[INFO] http://localhost:61111/app/dashboards#/view/37b49c50-2dc6-11eb-8af3-cb3aa84dbabd?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now)) 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:14]                             │
[00:00:14]                             │ debg browser[INFO] http://localhost:61111/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:16]                             │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:00:16]                             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:16]                             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:16]                             │ debg TestSubjects.missingOrFail(dashboardLandingPage)
[00:00:16]                             │ debg Find.waitForDeletedByCssSelector('[data-test-subj="dashboardLandingPage"]') with timeout=10000
[00:00:17]                             │ debg openPdfReportingPanel
[00:00:17]                             │ debg openShareMenuItem title:PDF Reports
[00:00:17]                             │ debg TestSubjects.exists(shareContextMenu)
[00:00:17]                             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="shareContextMenu"]') with timeout=2500
[00:00:18]                             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.async-search] creating index, cause [api], templates [], shards [1]/[0]
[00:00:20]                             │ debg --- retry.tryForTime error: [data-test-subj="shareContextMenu"] is not displayed
[00:00:20]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:20]                             │ debg TestSubjects.click(shareTopNavButton)
[00:00:20]                             │ debg Find.clickByCssSelector('[data-test-subj="shareTopNavButton"]') with timeout=10000
[00:00:20]                             │ debg Find.findByCssSelector('[data-test-subj="shareTopNavButton"]') with timeout=10000
[00:00:21]                             │ debg Find.findByCssSelector('div.euiContextMenuPanel') with timeout=10000
[00:00:22]                             │ debg TestSubjects.click(sharePanel-PDFReports)
[00:00:22]                             │ debg Find.clickByCssSelector('[data-test-subj="sharePanel-PDFReports"]') with timeout=10000
[00:00:22]                             │ debg Find.findByCssSelector('[data-test-subj="sharePanel-PDFReports"]') with timeout=10000
[00:00:23]                             │ debg Find.waitForElementStale with timeout=10000
[00:00:23]                             │ debg TestSubjects.click(generateReportButton)
[00:00:23]                             │ debg Find.clickByCssSelector('[data-test-subj="generateReportButton"]') with timeout=10000
[00:00:23]                             │ debg Find.findByCssSelector('[data-test-subj="generateReportButton"]') with timeout=10000
[00:00:24]                             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Rd_IhRxcTeKAXl892s0Ezg] update_mapping [_doc]
[00:00:24]                             │ debg getReportURL
[00:00:24]                             │ debg TestSubjects.getAttribute(downloadCompletedReportButton, href, tryTimeout=120000, findTimeout=60000)
[00:00:24]                             │ debg TestSubjects.find(downloadCompletedReportButton)
[00:00:24]                             │ debg Find.findByCssSelector('[data-test-subj="downloadCompletedReportButton"]') with timeout=60000
[00:01:25]                             │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="downloadCompletedReportButton"])
[00:01:25]                             │      Wait timed out after 61211ms
[00:01:26]                             │ debg TestSubjects.find(downloadCompletedReportButton)
[00:01:26]                             │ debg Find.findByCssSelector('[data-test-subj="downloadCompletedReportButton"]') with timeout=60000
[00:02:27]                             │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="downloadCompletedReportButton"])
[00:02:27]                             │      Wait timed out after 61192ms
[00:02:27]                             │ info Taking screenshot "/dev/shm/workspace/parallel/11/kibana/x-pack/test/functional/screenshots/failure/performance reporting dashbaord downloaded PDF has OK status.png"
[00:02:28]                             │ info Current URL is: http://localhost:61111/app/dashboards#/view/37b49c50-2dc6-11eb-8af3-cb3aa84dbabd?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:02:28]                             │ info Saving page source to: /dev/shm/workspace/parallel/11/kibana/x-pack/test/performance/failure_debug/html/performance reporting dashbaord downloaded PDF has OK status.html
[00:02:28]                             └- ✖ fail: performance reporting dashbaord downloaded PDF has OK status
[00:02:28]                             │      Error: retry.tryForTime timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="downloadCompletedReportButton"])
[00:02:28]                             │ Wait timed out after 61192ms
[00:02:28]                             │     at /dev/shm/workspace/parallel/11/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:02:28]                             │     at runMicrotasks (<anonymous>)
[00:02:28]                             │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:02:28]                             │       at onFailure (/dev/shm/workspace/parallel/11/kibana/test/common/services/retry/retry_for_success.ts:17:9)
[00:02:28]                             │       at retryForSuccess (/dev/shm/workspace/parallel/11/kibana/test/common/services/retry/retry_for_success.ts:57:13)
[00:02:28]                             │       at RetryService.tryForTime (/dev/shm/workspace/parallel/11/kibana/test/common/services/retry/retry.ts:22:12)
[00:02:28]                             │       at TestSubjects.getAttribute (/dev/shm/workspace/parallel/11/kibana/test/functional/services/common/test_subjects.ts:190:12)
[00:02:28]                             │       at ReportingPageObject.getReportURL (test/functional/page_objects/reporting_page.ts:36:17)
[00:02:28]                             │       at Context.<anonymous> (test/performance/tests/reporting_dashboard.ts:50:7)
[00:02:28]                             │       at Object.apply (/dev/shm/workspace/parallel/11/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:02:28]                             │ 
[00:02:28]                             │ 

Stack Trace

Error: retry.tryForTime timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="downloadCompletedReportButton"])
Wait timed out after 61192ms
    at /dev/shm/workspace/parallel/11/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at onFailure (/dev/shm/workspace/parallel/11/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/11/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at RetryService.tryForTime (/dev/shm/workspace/parallel/11/kibana/test/common/services/retry/retry.ts:22:12)
    at TestSubjects.getAttribute (/dev/shm/workspace/parallel/11/kibana/test/functional/services/common/test_subjects.ts:190:12)
    at ReportingPageObject.getReportURL (test/functional/page_objects/reporting_page.ts:36:17)
    at Context.<anonymous> (test/performance/tests/reporting_dashboard.ts:50:7)
    at Object.apply (/dev/shm/workspace/parallel/11/kibana/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
upgradeAssistant 212.3KB 213.1KB +824.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 408.2KB 408.3KB +70.0B

History

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

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @yuliacech!

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.

Code and screenshot looks great! Thanks for doing this, Yulia. I didn't test the links or test locally.

sabarasaba pushed a commit to sabarasaba/kibana that referenced this pull request Oct 20, 2021
* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
@yuliacech yuliacech deleted the ua_batch_reindex_docs branch October 25, 2021 18:38
sabarasaba pushed a commit to sabarasaba/kibana that referenced this pull request Oct 26, 2021
* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
sabarasaba pushed a commit to sabarasaba/kibana that referenced this pull request Oct 26, 2021
* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
sabarasaba added a commit that referenced this pull request Nov 9, 2021
* Fix link to Cloud deployment URL in upgrade step. (#109528)

* [Upgrade Assistant] Refactor CITs

* Rename UA steps to fix_issues_step and fix_logs_step. (#109526)

* Rename tests accordingly.

* [Upgrade Assistant] Cleanup scss (#109524)

* [Upgrade Assistant] Update readme (#109502)

* Add "Back up data" step to UA (#109543)

* Add backup step with static content and link to Snapshot and Restore.
* Add snapshot_restore locator.
* Remove unnecessary describe block from Upgrade Step tests.
* Remove unused render_app.tsx.

* Change copy references of 'deprecation issues' to 'deprecation warnings'. (#109963)

* [Upgrade Assistant] Address design feedback for ES deprecations page (#109726)

* [Upgrade Assistant] Add checkpoint feature to Overview page (#109449)

* Add on-Cloud state to Upgrade Assistant 'Back up data' step (#109956)

* [Upgrade Assistant] Refactor external links to use locators (#110435)

* [Upgrade Assistant] Use AppContext for services instead of KibanaContext (#109801)

* Remove kibana context dependency in favour of app context

* Add missing type to ContextValue

* Fix mock type

* Refactor app mount flow and types

* Refactor to use useServices hook

* Fix linter issues

* Keep mount_management_section and initialize breadcrumbs and api there

* Remove useServices and usePlugins in favour of just useAppContext

* Remove unnecessary mocks

* [Upgrade Assistant] Enable functional and a11y tests (#109909)

* [Upgrade Assistant] Remove version from UA nav title (#110739)

* [Upgrade Assistant] New Kibana deprecations page (#110101)

* Use injected lib.handleEsError instead of importing it in Upgrade Assistant API route handlers. (#111067)

* Add tests for UA back up data step on Cloud (#111066)

* Update UA to consume snapshotsUrl as provided by the Cloud plugin. (#111239)

* Skip flaky UA Backup step polling test.

* [Upgrade Assistant] Refactor kibana deprecation service mocks (#111168)

* [Upgrade Assistant] Remove unnecessary EuiScreenReaderOnly from stat panels (#111518)

* Remove EuiScreenReaderOnly implementations

* Remove unused translations

* Remove extra string after merge conflict

* Use consistent 'issues' and 'critical' vs. 'warning' terminology in UA. (#111221)

* Refactor UA Overview to support step-completion (#111243)

* Refactor UA Overview to store step-completion state at the root and delegate step-completion logic to each step component.
* Add completion status to logs and issues steps

* [Upgrade Assistant] External links with checkpoint time-range applied (#111252)

* Bound query around last checkpoint date

* Fix tests

* Also test discover url contains search params

* Small refactor

* Keep state about lastCheckpoint in parent component

* Remove space

* Address CR changes

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

* [Upgrade Assistant] Tests for updating step state accordingly if API poll receives count followed by error (#111701)

* Add test for logs count polling

* Test when count api fails

* [Upgrade Assistant] Add a11y tests for es deprecation flyouts (#110843)

* [Upgrade Assistant] Set fix_logs step as incomplete if log collection is not enabled (#111827)

* set step as incomplete if toggle is disabled

* Fix test names

* Remove unnecessary mocks

* [Upgrade Assistant] Update copy to use "issues" instead of "warnings" (#111817)

* Create common deprecation issues panel component in UA (#111231)

* Refine success state behavior and add tests.
* Refactor components into a components directory.
* Refactor SCSS to colocate styles with their components.
* Refactor tests to reduce boilerplate and clarify conditions under test.

* [Upgrade Assistant] Fix Kibana deprecations warning message

* [Upgrade Assistant] Add support for API keys when reindexing (#111451)

* [Upgrade Assistant] Update readme (#112154)

* [Upgrade Assistant] Make infra plugin optional (#111960)

* Make infra plugin optional

* Fix CR requests

* [Upgrade Assistant] Improve flyout information architecture (#111713)

* Make sure longstrings inside flyout body are text-wrap

* Show resolved badge for reindex flyout and row

* Finish off rest of ES deprecation flyouts

* Refactor deprecation badge into its own component

* Add tests for kibana deprecations

* Add tests for es deprecations

* Also check that we have status=error before rendering error callout

* Check for non-complete states instead of just error

* Small refactor

* Default deprecation is not resolvable

* Add a bit more spacing between title and badge

* Address CR changes

* Use EuiSpacer instead of flexitems

* [Upgrade Assistant] Update readme (#112195)

* [Upgrade Assistant] Add integration tests for Overview page (#111370)

* Add a11y tests for when overview page has toggle enabled

* Add functional and accessibility tests for overview page

* Load test files

* Fix linter error

* Navigate before asserting

* Steps have now completion state

* Remove duped word

* Run setup only once, not per test

* Address CR changes

* No need to renavigate to the page

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

* [Upgrade Assistant] Add note about compatibility headers (#110469)

* Improve error states for Upgrade Assistant deprecation issues (#112457)

* Simplify error state for deprecation issues panels. Remove <EsStatsError />.

* Rename components from stats -> panel.

* Create common error-reporting component for use in both Kibana and ES deprecations pages.
* Align order of loading, error, and success states between these pages.
* Change references to 'deprecations' -> 'deprecation issues'.

* Fix tests for panels.

* Add API integration test for handling auth error.

* Fix TS errors.

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

* Change count poll time to 15s (#112669)

* [Upgrade Assistant] Add permissions check to logs step (#112420)

* [Upgrade Assistant] Refactor telemetry (#112177)

* [Upgrade Assistant] Check for ML upgrade mode before enabling flyout actions (#112555)

* Add missing error handlers for deprecation logging route (#113109)

* [Upgrade Assistant] Batch reindex docs (#112960)

* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

* [Upgrade Assistant] Improve error messages for GET /api/upgrade_assistant/reindex/<index> (#112961)

* Add support for single manual steps to Upgrade Assistant. (#113344)

* Revert "[Upgrade Assistant] Refactor telemetry (#112177)" (#113665)

This reverts commit 991d24b.

* [Upgrade Assistant] Use skipFetchFields when creating the indexPattern in order to avoid errors if index doesn't exist (#113821)

* Use skipFetchFields when creating the indexPatter in order to avoid errors when index doesnt exist

* Address CR feedback

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

* [Upgrade Assistant] Hide system indices from es deprecations list (#113627)

* Refactor reindex routes into separate single and batch reindex files. Apply version precheck to batch routes. (#113822)

* [Upgrade Assistant] Remove ML/Watcher logic (#113224)

* Add show upgrade flag to url (#114243)

* [Upgrade Assistant] Delete deprecation log cache (#114113)

* [Upgrade Assistant] Add upgrade system indices section (#110593)

* [Upgrade Assistant] Reindexing progress (#114275)

* [Upgrade Assistant] Added reindexing progress in % to the reindex flyout and es deprecations table

* [Upgrade Assistant] Renamed first argument in `getReindexProgressLabel` to `reindexTaskPercComplete` for consistency

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

* [Upgrade Assistant] Remove Fix manually heading when there are no manual steps

* Add rolling upgrade interstitials to UA (#112907)

* Refactor FixLogsStep to be explicit in which props are passed to DeprecationLoggingToggle.

* Centralize error-handling logic in the api service, instead of handling it within each individual API request. Covers:
- Cloud backup status
- ES deprecations
- Deprecation logging
- Remove index settings
- ML
- Reindexing

Also:
- Handle 426 error state and surface in UI.
- Move ResponseError type into common/types.

* Add note about intended use case of status API route.

* Add endpoint dedicated to surfacing the cluster upgrade state, and a client-side poll.

* Merge App and AppWithRouter components.

* [Upgrade Assistant] Added "accept changes" header to the warnings list in the reindex flyout (#114798)

* Refactor kibana deprecation tests (#114763)

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

* Fix linter issues

* Remove unused translation

* Prefer master changes over 7.x for ml docs

* Prefer master changes over 7.x

* Skip tests

* Move everything to a single describe

* Fix types

* Add missing prop to mock

* [Upgrade Assistant] Removed "closed index" warning from reindex flyout (#114861)

* [Upgrade Assistant] Removed "closed index" warning that reindexing might take longer than usual, which is not the case

* [Upgrade Assistant] Also deleted i18n strings that are not needed anymore

* Add LevelIconTips to be more explicit about the difference between critical and warning issues. (#115121)

* Extract common DeprecationFlyoutLearnMoreLink component and change wording to 'Learn more'. (#115117)

* [Upgrade Assistant] Reindexing cancellation (#114636)

* [Upgrade Assistant] Updated the reindexing cancellation to look less like an error

* [Upgrade Assistant] Fixed an i18n issue and updated a jest snapshot

* [Upgrade Assistant] Updated cancelled reindexing state with a unified label and cross icon

* [Upgrade Assistant] Fixed snapshot test

* [Upgrade Assistant] Updated spacing to the reindex cancel button

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

* Fix test errors (#115183)

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

* [Upgrade Assistant] Overview page UI clean up (#115258)

- Scaling down deprecation issue panel title size to flow with typographic hierarchy.
- Removing panel around deprecation logging switch to reduce visual elements.
- Using success instead of green color for migration complete message.

* Revert "Revert "[Upgrade Assistant] Refactor telemetry (#112177)" (#113665)" (#114804)

This reverts commit c385d49.
* Add migration to remove obsolete attributes from telemetry saved object.
* Refactor UA telemetry constants by extracting it from common/types.

* [Upgrade Assistant] Rename upgrade_status to migration_status (#114755)

* [Upgrade Assistant] Swapped reindexing flyouts order (#115046)

* [Upgrade Assistant] Changed reindexing steps order, replaced a warning callout with a text element

* [Upgrade Assistant] Fixed reindex flyout test and changed warning callout from danger color to warning color

* [Upgrade Assistant] Fixed the correct status to show warnings

* [Upgrade Assistant] Fixed i18n strings

* [Upgrade Assistant] Moved reindex with warnings logic into a function

* [Upgrade Assistant] Updated reindex flyout copy

* [Upgrade Assistant] Also added a trailing period to the reindex step 3

* [Upgrade Assistant] Fixed i18n strings and step 3 wording

* [Upgrade Assistant] Added docs changes

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

* [Upgrade Assistant] Hide features that don't need to be migrated from flyout (#115535)

* Filter out system indices that dont require migration on server side
* Rename to attrs to migration
* Update flyout snapshot.

* Refine Upgrade Assistant copy. (#115472)

* Remove unused file

* Fix kibanaVersion dep

* Updated config.ts to fix UA test

UA functional API integration test to check cloud backup status creates a snapshot repo, which fails to be created with my changes to config.ts `'path.repo=/tmp/repo,/tmp/repo_1,/tmp/repo_2,'`. Adding `/tmp/cloud-snapshots/'` to the config fixes the test.

* Address CR changes

* Add missing error handler for system indices migration (#116088)

* Fix broken tests

* Fix test

* Skip tests

* Fix linter errors and import

* [Upgrade Assistant] Fix typo in retrieval of cluster settings (#116335)

* Fix typos

* Fix typo also in server tests

* Make sure log collection remains enabled throughout the test

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

* Fix type errors

* Fix integration test types

* Fix accessibility test type errors

* Fix linter errors in shared_imports

* Fix functional test types

Co-authored-by: CJ Cenizal <[email protected]>
Co-authored-by: Alison Goryachev <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Yulia Čech <[email protected]>
Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Dmitry Borodyansky <[email protected]>
spalger pushed a commit to spalger/kibana that referenced this pull request Nov 11, 2021
* Fix link to Cloud deployment URL in upgrade step. (elastic#109528)

* [Upgrade Assistant] Refactor CITs

* Rename UA steps to fix_issues_step and fix_logs_step. (elastic#109526)

* Rename tests accordingly.

* [Upgrade Assistant] Cleanup scss (elastic#109524)

* [Upgrade Assistant] Update readme (elastic#109502)

* Add "Back up data" step to UA (elastic#109543)

* Add backup step with static content and link to Snapshot and Restore.
* Add snapshot_restore locator.
* Remove unnecessary describe block from Upgrade Step tests.
* Remove unused render_app.tsx.

* Change copy references of 'deprecation issues' to 'deprecation warnings'. (elastic#109963)

* [Upgrade Assistant] Address design feedback for ES deprecations page (elastic#109726)

* [Upgrade Assistant] Add checkpoint feature to Overview page (elastic#109449)

* Add on-Cloud state to Upgrade Assistant 'Back up data' step (elastic#109956)

* [Upgrade Assistant] Refactor external links to use locators (elastic#110435)

* [Upgrade Assistant] Use AppContext for services instead of KibanaContext (elastic#109801)

* Remove kibana context dependency in favour of app context

* Add missing type to ContextValue

* Fix mock type

* Refactor app mount flow and types

* Refactor to use useServices hook

* Fix linter issues

* Keep mount_management_section and initialize breadcrumbs and api there

* Remove useServices and usePlugins in favour of just useAppContext

* Remove unnecessary mocks

* [Upgrade Assistant] Enable functional and a11y tests (elastic#109909)

* [Upgrade Assistant] Remove version from UA nav title (elastic#110739)

* [Upgrade Assistant] New Kibana deprecations page (elastic#110101)

* Use injected lib.handleEsError instead of importing it in Upgrade Assistant API route handlers. (elastic#111067)

* Add tests for UA back up data step on Cloud (elastic#111066)

* Update UA to consume snapshotsUrl as provided by the Cloud plugin. (elastic#111239)

* Skip flaky UA Backup step polling test.

* [Upgrade Assistant] Refactor kibana deprecation service mocks (elastic#111168)

* [Upgrade Assistant] Remove unnecessary EuiScreenReaderOnly from stat panels (elastic#111518)

* Remove EuiScreenReaderOnly implementations

* Remove unused translations

* Remove extra string after merge conflict

* Use consistent 'issues' and 'critical' vs. 'warning' terminology in UA. (elastic#111221)

* Refactor UA Overview to support step-completion (elastic#111243)

* Refactor UA Overview to store step-completion state at the root and delegate step-completion logic to each step component.
* Add completion status to logs and issues steps

* [Upgrade Assistant] External links with checkpoint time-range applied (elastic#111252)

* Bound query around last checkpoint date

* Fix tests

* Also test discover url contains search params

* Small refactor

* Keep state about lastCheckpoint in parent component

* Remove space

* Address CR changes

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

* [Upgrade Assistant] Tests for updating step state accordingly if API poll receives count followed by error (elastic#111701)

* Add test for logs count polling

* Test when count api fails

* [Upgrade Assistant] Add a11y tests for es deprecation flyouts (elastic#110843)

* [Upgrade Assistant] Set fix_logs step as incomplete if log collection is not enabled (elastic#111827)

* set step as incomplete if toggle is disabled

* Fix test names

* Remove unnecessary mocks

* [Upgrade Assistant] Update copy to use "issues" instead of "warnings" (elastic#111817)

* Create common deprecation issues panel component in UA (elastic#111231)

* Refine success state behavior and add tests.
* Refactor components into a components directory.
* Refactor SCSS to colocate styles with their components.
* Refactor tests to reduce boilerplate and clarify conditions under test.

* [Upgrade Assistant] Fix Kibana deprecations warning message

* [Upgrade Assistant] Add support for API keys when reindexing (elastic#111451)

* [Upgrade Assistant] Update readme (elastic#112154)

* [Upgrade Assistant] Make infra plugin optional (elastic#111960)

* Make infra plugin optional

* Fix CR requests

* [Upgrade Assistant] Improve flyout information architecture (elastic#111713)

* Make sure longstrings inside flyout body are text-wrap

* Show resolved badge for reindex flyout and row

* Finish off rest of ES deprecation flyouts

* Refactor deprecation badge into its own component

* Add tests for kibana deprecations

* Add tests for es deprecations

* Also check that we have status=error before rendering error callout

* Check for non-complete states instead of just error

* Small refactor

* Default deprecation is not resolvable

* Add a bit more spacing between title and badge

* Address CR changes

* Use EuiSpacer instead of flexitems

* [Upgrade Assistant] Update readme (elastic#112195)

* [Upgrade Assistant] Add integration tests for Overview page (elastic#111370)

* Add a11y tests for when overview page has toggle enabled

* Add functional and accessibility tests for overview page

* Load test files

* Fix linter error

* Navigate before asserting

* Steps have now completion state

* Remove duped word

* Run setup only once, not per test

* Address CR changes

* No need to renavigate to the page

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

* [Upgrade Assistant] Add note about compatibility headers (elastic#110469)

* Improve error states for Upgrade Assistant deprecation issues (elastic#112457)

* Simplify error state for deprecation issues panels. Remove <EsStatsError />.

* Rename components from stats -> panel.

* Create common error-reporting component for use in both Kibana and ES deprecations pages.
* Align order of loading, error, and success states between these pages.
* Change references to 'deprecations' -> 'deprecation issues'.

* Fix tests for panels.

* Add API integration test for handling auth error.

* Fix TS errors.

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

* Change count poll time to 15s (elastic#112669)

* [Upgrade Assistant] Add permissions check to logs step (elastic#112420)

* [Upgrade Assistant] Refactor telemetry (elastic#112177)

* [Upgrade Assistant] Check for ML upgrade mode before enabling flyout actions (elastic#112555)

* Add missing error handlers for deprecation logging route (elastic#113109)

* [Upgrade Assistant] Batch reindex docs (elastic#112960)

* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

* [Upgrade Assistant] Improve error messages for GET /api/upgrade_assistant/reindex/<index> (elastic#112961)

* Add support for single manual steps to Upgrade Assistant. (elastic#113344)

* Revert "[Upgrade Assistant] Refactor telemetry (elastic#112177)" (elastic#113665)

This reverts commit 991d24b.

* [Upgrade Assistant] Use skipFetchFields when creating the indexPattern in order to avoid errors if index doesn't exist (elastic#113821)

* Use skipFetchFields when creating the indexPatter in order to avoid errors when index doesnt exist

* Address CR feedback

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

* [Upgrade Assistant] Hide system indices from es deprecations list (elastic#113627)

* Refactor reindex routes into separate single and batch reindex files. Apply version precheck to batch routes. (elastic#113822)

* [Upgrade Assistant] Remove ML/Watcher logic (elastic#113224)

* Add show upgrade flag to url (elastic#114243)

* [Upgrade Assistant] Delete deprecation log cache (elastic#114113)

* [Upgrade Assistant] Add upgrade system indices section (elastic#110593)

* [Upgrade Assistant] Reindexing progress (elastic#114275)

* [Upgrade Assistant] Added reindexing progress in % to the reindex flyout and es deprecations table

* [Upgrade Assistant] Renamed first argument in `getReindexProgressLabel` to `reindexTaskPercComplete` for consistency

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

* [Upgrade Assistant] Remove Fix manually heading when there are no manual steps

* Add rolling upgrade interstitials to UA (elastic#112907)

* Refactor FixLogsStep to be explicit in which props are passed to DeprecationLoggingToggle.

* Centralize error-handling logic in the api service, instead of handling it within each individual API request. Covers:
- Cloud backup status
- ES deprecations
- Deprecation logging
- Remove index settings
- ML
- Reindexing

Also:
- Handle 426 error state and surface in UI.
- Move ResponseError type into common/types.

* Add note about intended use case of status API route.

* Add endpoint dedicated to surfacing the cluster upgrade state, and a client-side poll.

* Merge App and AppWithRouter components.

* [Upgrade Assistant] Added "accept changes" header to the warnings list in the reindex flyout (elastic#114798)

* Refactor kibana deprecation tests (elastic#114763)

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

* Fix linter issues

* Remove unused translation

* Prefer master changes over 7.x for ml docs

* Prefer master changes over 7.x

* Skip tests

* Move everything to a single describe

* Fix types

* Add missing prop to mock

* [Upgrade Assistant] Removed "closed index" warning from reindex flyout (elastic#114861)

* [Upgrade Assistant] Removed "closed index" warning that reindexing might take longer than usual, which is not the case

* [Upgrade Assistant] Also deleted i18n strings that are not needed anymore

* Add LevelIconTips to be more explicit about the difference between critical and warning issues. (elastic#115121)

* Extract common DeprecationFlyoutLearnMoreLink component and change wording to 'Learn more'. (elastic#115117)

* [Upgrade Assistant] Reindexing cancellation (elastic#114636)

* [Upgrade Assistant] Updated the reindexing cancellation to look less like an error

* [Upgrade Assistant] Fixed an i18n issue and updated a jest snapshot

* [Upgrade Assistant] Updated cancelled reindexing state with a unified label and cross icon

* [Upgrade Assistant] Fixed snapshot test

* [Upgrade Assistant] Updated spacing to the reindex cancel button

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

* Fix test errors (elastic#115183)

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

* [Upgrade Assistant] Overview page UI clean up (elastic#115258)

- Scaling down deprecation issue panel title size to flow with typographic hierarchy.
- Removing panel around deprecation logging switch to reduce visual elements.
- Using success instead of green color for migration complete message.

* Revert "Revert "[Upgrade Assistant] Refactor telemetry (elastic#112177)" (elastic#113665)" (elastic#114804)

This reverts commit c385d49.
* Add migration to remove obsolete attributes from telemetry saved object.
* Refactor UA telemetry constants by extracting it from common/types.

* [Upgrade Assistant] Rename upgrade_status to migration_status (elastic#114755)

* [Upgrade Assistant] Swapped reindexing flyouts order (elastic#115046)

* [Upgrade Assistant] Changed reindexing steps order, replaced a warning callout with a text element

* [Upgrade Assistant] Fixed reindex flyout test and changed warning callout from danger color to warning color

* [Upgrade Assistant] Fixed the correct status to show warnings

* [Upgrade Assistant] Fixed i18n strings

* [Upgrade Assistant] Moved reindex with warnings logic into a function

* [Upgrade Assistant] Updated reindex flyout copy

* [Upgrade Assistant] Also added a trailing period to the reindex step 3

* [Upgrade Assistant] Fixed i18n strings and step 3 wording

* [Upgrade Assistant] Added docs changes

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

* [Upgrade Assistant] Hide features that don't need to be migrated from flyout (elastic#115535)

* Filter out system indices that dont require migration on server side
* Rename to attrs to migration
* Update flyout snapshot.

* Refine Upgrade Assistant copy. (elastic#115472)

* Remove unused file

* Fix kibanaVersion dep

* Updated config.ts to fix UA test

UA functional API integration test to check cloud backup status creates a snapshot repo, which fails to be created with my changes to config.ts `'path.repo=/tmp/repo,/tmp/repo_1,/tmp/repo_2,'`. Adding `/tmp/cloud-snapshots/'` to the config fixes the test.

* Address CR changes

* Add missing error handler for system indices migration (elastic#116088)

* Fix broken tests

* Fix test

* Skip tests

* Fix linter errors and import

* [Upgrade Assistant] Fix typo in retrieval of cluster settings (elastic#116335)

* Fix typos

* Fix typo also in server tests

* Make sure log collection remains enabled throughout the test

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

* Fix type errors

* Fix integration test types

* Fix accessibility test type errors

* Fix linter errors in shared_imports

* Fix functional test types

Co-authored-by: CJ Cenizal <[email protected]>
Co-authored-by: Alison Goryachev <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Yulia Čech <[email protected]>
Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Dmitry Borodyansky <[email protected]>
spalger pushed a commit that referenced this pull request Nov 11, 2021
* [Upgrade Assistant] Forwardport from 7.x (#114966)

* Fix link to Cloud deployment URL in upgrade step. (#109528)

* [Upgrade Assistant] Refactor CITs

* Rename UA steps to fix_issues_step and fix_logs_step. (#109526)

* Rename tests accordingly.

* [Upgrade Assistant] Cleanup scss (#109524)

* [Upgrade Assistant] Update readme (#109502)

* Add "Back up data" step to UA (#109543)

* Add backup step with static content and link to Snapshot and Restore.
* Add snapshot_restore locator.
* Remove unnecessary describe block from Upgrade Step tests.
* Remove unused render_app.tsx.

* Change copy references of 'deprecation issues' to 'deprecation warnings'. (#109963)

* [Upgrade Assistant] Address design feedback for ES deprecations page (#109726)

* [Upgrade Assistant] Add checkpoint feature to Overview page (#109449)

* Add on-Cloud state to Upgrade Assistant 'Back up data' step (#109956)

* [Upgrade Assistant] Refactor external links to use locators (#110435)

* [Upgrade Assistant] Use AppContext for services instead of KibanaContext (#109801)

* Remove kibana context dependency in favour of app context

* Add missing type to ContextValue

* Fix mock type

* Refactor app mount flow and types

* Refactor to use useServices hook

* Fix linter issues

* Keep mount_management_section and initialize breadcrumbs and api there

* Remove useServices and usePlugins in favour of just useAppContext

* Remove unnecessary mocks

* [Upgrade Assistant] Enable functional and a11y tests (#109909)

* [Upgrade Assistant] Remove version from UA nav title (#110739)

* [Upgrade Assistant] New Kibana deprecations page (#110101)

* Use injected lib.handleEsError instead of importing it in Upgrade Assistant API route handlers. (#111067)

* Add tests for UA back up data step on Cloud (#111066)

* Update UA to consume snapshotsUrl as provided by the Cloud plugin. (#111239)

* Skip flaky UA Backup step polling test.

* [Upgrade Assistant] Refactor kibana deprecation service mocks (#111168)

* [Upgrade Assistant] Remove unnecessary EuiScreenReaderOnly from stat panels (#111518)

* Remove EuiScreenReaderOnly implementations

* Remove unused translations

* Remove extra string after merge conflict

* Use consistent 'issues' and 'critical' vs. 'warning' terminology in UA. (#111221)

* Refactor UA Overview to support step-completion (#111243)

* Refactor UA Overview to store step-completion state at the root and delegate step-completion logic to each step component.
* Add completion status to logs and issues steps

* [Upgrade Assistant] External links with checkpoint time-range applied (#111252)

* Bound query around last checkpoint date

* Fix tests

* Also test discover url contains search params

* Small refactor

* Keep state about lastCheckpoint in parent component

* Remove space

* Address CR changes

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

* [Upgrade Assistant] Tests for updating step state accordingly if API poll receives count followed by error (#111701)

* Add test for logs count polling

* Test when count api fails

* [Upgrade Assistant] Add a11y tests for es deprecation flyouts (#110843)

* [Upgrade Assistant] Set fix_logs step as incomplete if log collection is not enabled (#111827)

* set step as incomplete if toggle is disabled

* Fix test names

* Remove unnecessary mocks

* [Upgrade Assistant] Update copy to use "issues" instead of "warnings" (#111817)

* Create common deprecation issues panel component in UA (#111231)

* Refine success state behavior and add tests.
* Refactor components into a components directory.
* Refactor SCSS to colocate styles with their components.
* Refactor tests to reduce boilerplate and clarify conditions under test.

* [Upgrade Assistant] Fix Kibana deprecations warning message

* [Upgrade Assistant] Add support for API keys when reindexing (#111451)

* [Upgrade Assistant] Update readme (#112154)

* [Upgrade Assistant] Make infra plugin optional (#111960)

* Make infra plugin optional

* Fix CR requests

* [Upgrade Assistant] Improve flyout information architecture (#111713)

* Make sure longstrings inside flyout body are text-wrap

* Show resolved badge for reindex flyout and row

* Finish off rest of ES deprecation flyouts

* Refactor deprecation badge into its own component

* Add tests for kibana deprecations

* Add tests for es deprecations

* Also check that we have status=error before rendering error callout

* Check for non-complete states instead of just error

* Small refactor

* Default deprecation is not resolvable

* Add a bit more spacing between title and badge

* Address CR changes

* Use EuiSpacer instead of flexitems

* [Upgrade Assistant] Update readme (#112195)

* [Upgrade Assistant] Add integration tests for Overview page (#111370)

* Add a11y tests for when overview page has toggle enabled

* Add functional and accessibility tests for overview page

* Load test files

* Fix linter error

* Navigate before asserting

* Steps have now completion state

* Remove duped word

* Run setup only once, not per test

* Address CR changes

* No need to renavigate to the page

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

* [Upgrade Assistant] Add note about compatibility headers (#110469)

* Improve error states for Upgrade Assistant deprecation issues (#112457)

* Simplify error state for deprecation issues panels. Remove <EsStatsError />.

* Rename components from stats -> panel.

* Create common error-reporting component for use in both Kibana and ES deprecations pages.
* Align order of loading, error, and success states between these pages.
* Change references to 'deprecations' -> 'deprecation issues'.

* Fix tests for panels.

* Add API integration test for handling auth error.

* Fix TS errors.

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

* Change count poll time to 15s (#112669)

* [Upgrade Assistant] Add permissions check to logs step (#112420)

* [Upgrade Assistant] Refactor telemetry (#112177)

* [Upgrade Assistant] Check for ML upgrade mode before enabling flyout actions (#112555)

* Add missing error handlers for deprecation logging route (#113109)

* [Upgrade Assistant] Batch reindex docs (#112960)

* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <[email protected]>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

* [Upgrade Assistant] Improve error messages for GET /api/upgrade_assistant/reindex/<index> (#112961)

* Add support for single manual steps to Upgrade Assistant. (#113344)

* Revert "[Upgrade Assistant] Refactor telemetry (#112177)" (#113665)

This reverts commit 991d24b.

* [Upgrade Assistant] Use skipFetchFields when creating the indexPattern in order to avoid errors if index doesn't exist (#113821)

* Use skipFetchFields when creating the indexPatter in order to avoid errors when index doesnt exist

* Address CR feedback

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

* [Upgrade Assistant] Hide system indices from es deprecations list (#113627)

* Refactor reindex routes into separate single and batch reindex files. Apply version precheck to batch routes. (#113822)

* [Upgrade Assistant] Remove ML/Watcher logic (#113224)

* Add show upgrade flag to url (#114243)

* [Upgrade Assistant] Delete deprecation log cache (#114113)

* [Upgrade Assistant] Add upgrade system indices section (#110593)

* [Upgrade Assistant] Reindexing progress (#114275)

* [Upgrade Assistant] Added reindexing progress in % to the reindex flyout and es deprecations table

* [Upgrade Assistant] Renamed first argument in `getReindexProgressLabel` to `reindexTaskPercComplete` for consistency

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

* [Upgrade Assistant] Remove Fix manually heading when there are no manual steps

* Add rolling upgrade interstitials to UA (#112907)

* Refactor FixLogsStep to be explicit in which props are passed to DeprecationLoggingToggle.

* Centralize error-handling logic in the api service, instead of handling it within each individual API request. Covers:
- Cloud backup status
- ES deprecations
- Deprecation logging
- Remove index settings
- ML
- Reindexing

Also:
- Handle 426 error state and surface in UI.
- Move ResponseError type into common/types.

* Add note about intended use case of status API route.

* Add endpoint dedicated to surfacing the cluster upgrade state, and a client-side poll.

* Merge App and AppWithRouter components.

* [Upgrade Assistant] Added "accept changes" header to the warnings list in the reindex flyout (#114798)

* Refactor kibana deprecation tests (#114763)

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

* Fix linter issues

* Remove unused translation

* Prefer master changes over 7.x for ml docs

* Prefer master changes over 7.x

* Skip tests

* Move everything to a single describe

* Fix types

* Add missing prop to mock

* [Upgrade Assistant] Removed "closed index" warning from reindex flyout (#114861)

* [Upgrade Assistant] Removed "closed index" warning that reindexing might take longer than usual, which is not the case

* [Upgrade Assistant] Also deleted i18n strings that are not needed anymore

* Add LevelIconTips to be more explicit about the difference between critical and warning issues. (#115121)

* Extract common DeprecationFlyoutLearnMoreLink component and change wording to 'Learn more'. (#115117)

* [Upgrade Assistant] Reindexing cancellation (#114636)

* [Upgrade Assistant] Updated the reindexing cancellation to look less like an error

* [Upgrade Assistant] Fixed an i18n issue and updated a jest snapshot

* [Upgrade Assistant] Updated cancelled reindexing state with a unified label and cross icon

* [Upgrade Assistant] Fixed snapshot test

* [Upgrade Assistant] Updated spacing to the reindex cancel button

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

* Fix test errors (#115183)

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

* [Upgrade Assistant] Overview page UI clean up (#115258)

- Scaling down deprecation issue panel title size to flow with typographic hierarchy.
- Removing panel around deprecation logging switch to reduce visual elements.
- Using success instead of green color for migration complete message.

* Revert "Revert "[Upgrade Assistant] Refactor telemetry (#112177)" (#113665)" (#114804)

This reverts commit c385d49.
* Add migration to remove obsolete attributes from telemetry saved object.
* Refactor UA telemetry constants by extracting it from common/types.

* [Upgrade Assistant] Rename upgrade_status to migration_status (#114755)

* [Upgrade Assistant] Swapped reindexing flyouts order (#115046)

* [Upgrade Assistant] Changed reindexing steps order, replaced a warning callout with a text element

* [Upgrade Assistant] Fixed reindex flyout test and changed warning callout from danger color to warning color

* [Upgrade Assistant] Fixed the correct status to show warnings

* [Upgrade Assistant] Fixed i18n strings

* [Upgrade Assistant] Moved reindex with warnings logic into a function

* [Upgrade Assistant] Updated reindex flyout copy

* [Upgrade Assistant] Also added a trailing period to the reindex step 3

* [Upgrade Assistant] Fixed i18n strings and step 3 wording

* [Upgrade Assistant] Added docs changes

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

* [Upgrade Assistant] Hide features that don't need to be migrated from flyout (#115535)

* Filter out system indices that dont require migration on server side
* Rename to attrs to migration
* Update flyout snapshot.

* Refine Upgrade Assistant copy. (#115472)

* Remove unused file

* Fix kibanaVersion dep

* Updated config.ts to fix UA test

UA functional API integration test to check cloud backup status creates a snapshot repo, which fails to be created with my changes to config.ts `'path.repo=/tmp/repo,/tmp/repo_1,/tmp/repo_2,'`. Adding `/tmp/cloud-snapshots/'` to the config fixes the test.

* Address CR changes

* Add missing error handler for system indices migration (#116088)

* Fix broken tests

* Fix test

* Skip tests

* Fix linter errors and import

* [Upgrade Assistant] Fix typo in retrieval of cluster settings (#116335)

* Fix typos

* Fix typo also in server tests

* Make sure log collection remains enabled throughout the test

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

* Fix type errors

* Fix integration test types

* Fix accessibility test type errors

* Fix linter errors in shared_imports

* Fix functional test types

Co-authored-by: CJ Cenizal <[email protected]>
Co-authored-by: Alison Goryachev <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Yulia Čech <[email protected]>
Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Dmitry Borodyansky <[email protected]>

* commit with @elastic.co email

Co-authored-by: Ignacio Rivas <[email protected]>
Co-authored-by: CJ Cenizal <[email protected]>
Co-authored-by: Alison Goryachev <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Yulia Čech <[email protected]>
Co-authored-by: James Rodewig <[email protected]>
Co-authored-by: Dmitry Borodyansky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Upgrade Assistant 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.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants