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

[UA] Upgrade assistant migration meta data can become stale #60789

Merged

Conversation

alisonelizabeth
Copy link
Contributor

Fixes #46146

This PR checks for any indices that have a deprecation warning and also a reindex operation of "completed", and deletes the reindex operation if so.

How to test

  1. Modify L46 of es_migration_apis.ts with the following mock data:
    indices: indices.concat([
      {
        level: 'critical',
        message: 'test failed fix',
        url: 'test/url',
        details: 'test details',
        index: 'test',
        reindex: true,
        needsDefaultFields: true,
      },
    ]),
  1. Create the test index
PUT test/_doc/1
{"foo":"bar"}
  1. Create a snapshot of the test index.
    You can use the Snapshot Restore UI to do this or Console using ES APIs. From the UI:

    • Create a repository
    • Create a policy with the test index selected
    • Execute the policy
  2. Go to Upgrade Assistant and reindex the test index

  3. Delete the reindexed index

  4. Restore the snapshot (via UI or Console)

  5. Navigate back to Upgrade Assistant. Verify the UI indicates that it needs to be reindexed again.

Release note

A fix was made to the Upgrade Assistant where the reindexing of an index was incorrectly marked as "Done", when it still required to be reindexed. This scenario could occur if a user reindexed an index, deleted it, then restored a snapshot of the index of an older version.

@alisonelizabeth alisonelizabeth added release_note:fix v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Upgrade Assistant v7.7.0 labels Mar 20, 2020
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

@alisonelizabeth Great work! Thanks for fixing this bug.

I tested locally and this contribution fixes the stale metadata bug!

@jloleysens
Copy link
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@alisonelizabeth alisonelizabeth merged commit 85481a7 into elastic:master Mar 23, 2020
@alisonelizabeth alisonelizabeth deleted the bugfix/ua/stale-metadata branch March 23, 2020 17:35
alisonelizabeth added a commit to alisonelizabeth/kibana that referenced this pull request Mar 23, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 23, 2020
* master: (26 commits)
  [Alerting] Fixes flaky test in Alert Instances Details page (elastic#60893)
  cleanup visualizations api (elastic#59958)
  Inline timezoneProvider function, remove ui/vis/lib/timezone  (elastic#60475)
  [SIEM] Adds 'Open one signal' Cypress test (elastic#60484)
  [UA] Upgrade assistant migration meta data can become stale (elastic#60789)
  [Metrics Alerts] Remove metric field from doc count on backend (elastic#60679)
  [Uptime] Skip failing location test temporarily (elastic#60938)
  [ML] Disabling datafeed editing when job is running (elastic#60751)
  Adding `authc.invalidateAPIKeyAsInternalUser` (elastic#60717)
  [SIEM] Add license check to ML Rule form (elastic#60691)
  Adding `authc.grantAPIKeyAsInternalUser`  (elastic#60423)
  Support Histogram Data Type (elastic#59387)
  [Upgrade Assistant] Fix edge case where reindex op can falsely be seen as stale (elastic#60770)
  [SIEM] [Cases] Update case icons (elastic#60812)
  [TSVB] Fix percentiles band mode (elastic#60741)
  Fix formatter on range aggregation (elastic#58651)
  Goodbye, legacy data plugin 👋 (elastic#60449)
  [Metrics UI] Alerting for metrics explorer and inventory (elastic#58779)
  [Remote clustersadopt changes to remote info API (elastic#60795)
  Only run xpack siem cypress in PRs when there are siem changes (elastic#60661)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Upgrade Assistant release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade assistant migration meta data can become stale
4 participants