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] External links with checkpoint time-range applied #111252

Conversation

sabarasaba
Copy link
Member

Fixes #111069

External links to Observability and Discover apps should now have a time-range applied to them based on the last checkpoint. I also removed a few instances of the Discover app in the plugin deps which should not be there any more.

@sabarasaba sabarasaba added enhancement New value added to drive a business result 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 6, 2021
@sabarasaba sabarasaba self-assigned this Sep 6, 2021
@@ -55,7 +55,14 @@ const DiscoverAppLink: FunctionComponent = () => {
return;
}

const url = await locator.getUrl({ indexPatternId });
const url = await locator.getUrl({
Copy link
Member Author

Choose a reason for hiding this comment

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

I dug a bit into useUrl and its implemented as a hook, which we cannot call from within the useEffect we have here. I'm leaving the getUrl instead because it will be more straightforward to read compared to having another top level hook that depends on the indexPatternId generated by this useEffect.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps in a separate PR we can change https://github.com/elastic/kibana/blob/master/src/plugins/share/common/url_service/locators/use_locator_url.ts#L42 to define the dependencies more comprehensively:

  // Convert params object to string to be able to compare its value,
  // allowing the consumer to freely pass new objects to the hook on each
  // render without requiring it to be memoized.
  const paramsStringified = params ? JSON.stringify(params) : undefined;

  /* eslint-disable react-hooks/exhaustive-deps */
  useEffect(() => {
    if (!locator) {
      setUrl('');
      return;
    }

    locator
      .getUrl(params, getUrlParams)
      .then((result: string) => {
        if (!isMounted()) return;
        setUrl(result);
      })
      .catch((error) => {
        if (!isMounted()) return;
        // eslint-disable-next-line no-console
        console.error('useLocatorUrl', error);
        setUrl('');
      });
  }, [locator, paramsStringified, ...deps]);
  /* eslint-enable react-hooks/exhaustive-deps */

This would allow us to consume the hook, since it will update once the indexPatternId dependency has resolved:

  /* 
   * All this code replaces the current `useEffect`
   */

  const [indexPatternId, setIndexPatternId] = useState<string | undefined>();

  useEffect(() => {
    async function fetchIndexPatternId() {
      setIndexPatternId(await getDeprecationIndexPatternId(dataService));
    }
    fetchIndexPatternId();
  }, []);

  const locator = share.url.locators.get('DISCOVER_APP_LOCATOR');
  const discoverUrl = locator?.useUrl({
    indexPatternId,
    query: {
      language: 'kuery',
      query: `@timestamp > "${lastCheckpoint}"`,
    },
  });

Copy link
Member Author

Choose a reason for hiding this comment

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

👍🏼 I've created #111512 to track that

@sabarasaba sabarasaba marked this pull request as ready for review September 6, 2021 08:42
@elasticmachine
Copy link
Contributor

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

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@cjcenizal
Copy link
Contributor

cjcenizal commented Sep 7, 2021

@sabarasaba The test failure is due to a flaky test that is now skipped in 7.x, FYI. Gonna merge upstream to get CI passing.

@cjcenizal
Copy link
Contributor

@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, code LGTM! I had a few suggestions on ways to improve the readability of the code. I think we can also make changes to use_locator_url so that we can use it here, but I think that's outside this PR's scope.

@@ -55,7 +55,14 @@ const DiscoverAppLink: FunctionComponent = () => {
return;
}

const url = await locator.getUrl({ indexPatternId });
const url = await locator.getUrl({
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps in a separate PR we can change https://github.com/elastic/kibana/blob/master/src/plugins/share/common/url_service/locators/use_locator_url.ts#L42 to define the dependencies more comprehensively:

  // Convert params object to string to be able to compare its value,
  // allowing the consumer to freely pass new objects to the hook on each
  // render without requiring it to be memoized.
  const paramsStringified = params ? JSON.stringify(params) : undefined;

  /* eslint-disable react-hooks/exhaustive-deps */
  useEffect(() => {
    if (!locator) {
      setUrl('');
      return;
    }

    locator
      .getUrl(params, getUrlParams)
      .then((result: string) => {
        if (!isMounted()) return;
        setUrl(result);
      })
      .catch((error) => {
        if (!isMounted()) return;
        // eslint-disable-next-line no-console
        console.error('useLocatorUrl', error);
        setUrl('');
      });
  }, [locator, paramsStringified, ...deps]);
  /* eslint-enable react-hooks/exhaustive-deps */

This would allow us to consume the hook, since it will update once the indexPatternId dependency has resolved:

  /* 
   * All this code replaces the current `useEffect`
   */

  const [indexPatternId, setIndexPatternId] = useState<string | undefined>();

  useEffect(() => {
    async function fetchIndexPatternId() {
      setIndexPatternId(await getDeprecationIndexPatternId(dataService));
    }
    fetchIndexPatternId();
  }, []);

  const locator = share.url.locators.get('DISCOVER_APP_LOCATOR');
  const discoverUrl = locator?.useUrl({
    indexPatternId,
    query: {
      language: 'kuery',
      query: `@timestamp > "${lastCheckpoint}"`,
    },
  });

@sabarasaba
Copy link
Member Author

@cjcenizal Thanks a lot for the review, I've addressed your points. Let me know if last commit is good and if so we can merge this one in 🚀

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.

Thanks for making these changes @sabarasaba! There was one small change from my original comments that wasn't addressed. Everything else looks great so please feel free to merge without another review.

@@ -48,7 +48,7 @@ const shareMock = sharePluginMock.createSetupContract();
shareMock.url.locators.get = (id: IdKey) => ({
useUrl: (): string | undefined => idToUrlMap[id],
getUrl: (params: Record<string, any>): string | undefined =>
`${idToUrlMap[id]}?${new URLSearchParams(convertObjectValuesToString(params)).toString()}`,
`${idToUrlMap[id]}?${new URLSearchParams(stringifySearchParams(params)).toString()}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this name makes more sense if the function returns a string. In #111252 (comment) I suggested moving new URLSearchParams().toString() into the function to accomplish that -- WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Somehow I miss read the previous comment, i patched that up and will merge when ci finishes 🚀

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
upgradeAssistant 138 139 +1

Async chunks

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

id before after diff
upgradeAssistant 208.7KB 209.1KB +488.0B

Page load bundle

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

id before after diff
upgradeAssistant 27.2KB 27.2KB +33.0B
Unknown metric groups

References to deprecated APIs

id before after diff
upgradeAssistant 4 3 -1

History

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

cc @sabarasaba

@LeeDr
Copy link
Contributor

LeeDr commented Sep 22, 2021

External links to Observability and Discover apps should now have a time-range applied to them based on the last checkpoint.

I'm not clear on the functionality of this time-range. Is it persisted somewhere? Or only used in a link in the browser of the user who clicked the checkpoint button?
If 2 or more admin users are trying to resolve deprecations, and one of them clicks the checkpoint button, does the other one get the same view?

@sabarasaba
Copy link
Member Author

It's currently only persisted in the users browser using localStorage. So the list deprecations one user is seeing could be different to another depending on the persisted timestamp that is used to filter the results.

sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Oct 14, 2021
…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 <42973632+kibanamachine@users.noreply.github.com>
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Oct 20, 2021
…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 <42973632+kibanamachine@users.noreply.github.com>
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Oct 26, 2021
…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 <42973632+kibanamachine@users.noreply.github.com>
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Oct 26, 2021
…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 <42973632+kibanamachine@users.noreply.github.com>
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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <40268737+jrodewig@users.noreply.github.com>

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

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

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

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <42973632+kibanamachine@users.noreply.github.com>

* Fix test errors (#115183)

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
kpatticha pushed a commit to kpatticha/kibana that referenced this pull request Nov 10, 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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <40268737+jrodewig@users.noreply.github.com>

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

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

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

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <42973632+kibanamachine@users.noreply.github.com>

* Fix test errors (elastic#115183)

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <40268737+jrodewig@users.noreply.github.com>

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

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

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

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <42973632+kibanamachine@users.noreply.github.com>

* Fix test errors (elastic#115183)

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <40268737+jrodewig@users.noreply.github.com>

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

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

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

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <42973632+kibanamachine@users.noreply.github.com>

* Fix test errors (#115183)

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>

* commit with @elastic.co email

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Nov 17, 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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <40268737+jrodewig@users.noreply.github.com>

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

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

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

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <42973632+kibanamachine@users.noreply.github.com>

* Fix test errors (elastic#115183)

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
roeehub pushed a commit to build-security/kibana that referenced this pull request Dec 16, 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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <40268737+jrodewig@users.noreply.github.com>

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

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

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

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <42973632+kibanamachine@users.noreply.github.com>

* Fix test errors (elastic#115183)

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

* [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 <42973632+kibanamachine@users.noreply.github.com>

* [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 <42973632+kibanamachine@users.noreply.github.com>

* 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 <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result 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.

5 participants