Skip to content

fix #66185#66186

Merged
ppisljar merged 9 commits intoelastic:masterfrom
ppisljar:fix/errorsavedobjects
Jun 8, 2020
Merged

fix #66185#66186
ppisljar merged 9 commits intoelastic:masterfrom
ppisljar:fix/errorsavedobjects

Conversation

@ppisljar
Copy link
Copy Markdown
Contributor

@ppisljar ppisljar commented May 12, 2020

Summary

Fixes bug with importing legacy json files without matching index patterns

Fixes #66185
Fixes #64280

Checklist

Delete any items that are not applicable to this PR.

@ppisljar ppisljar added the Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// label May 12, 2020
@ppisljar ppisljar requested a review from a team as a code owner May 12, 2020 10:00
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@ppisljar ppisljar force-pushed the fix/errorsavedobjects branch from 7a2f2af to 31be22b Compare May 13, 2020 11:58
@ppisljar ppisljar requested a review from a team as a code owner May 13, 2020 11:58
Copy link
Copy Markdown
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

I don't really understand what triggers this bug? We have an existing test for importing saved objects with an index pattern that doesn't exist, so I assume this is slightly different. Can we add a test case to https://github.com/elastic/kibana/blob/afca33b5206e1389af18da81a91682904f2b4c79/test/functional/apps/management/_import_objects.js

this.patternCache,
this.fieldsFetcher
this.apiClient,
this.patternCache
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we improve the types for patternCache (both the class property and constructor argument uses any) to prevent this from happening in the future?

@ppisljar
Copy link
Copy Markdown
Contributor Author

@rudolf: the test is different as it skips the import of the document with missing index pattern and this bug happens when you actually choose to import that document with a different index (selecting one of the indexes in dropdown)

@ppisljar ppisljar force-pushed the fix/errorsavedobjects branch from 2b406b9 to 4d59a6c Compare May 14, 2020 11:11
Copy link
Copy Markdown
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

👍 Can we backport this to include it in 7.7.1 and 7.8.1?

Copy link
Copy Markdown
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested in Firefox and works as expected. LGTM

@ppisljar
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

elasticmachine and others added 3 commits May 26, 2020 03:52
# Conflicts:
#	src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

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

@ppisljar ppisljar merged commit de4eaf9 into elastic:master Jun 8, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 8, 2020
* master:
  [ML] DFAnalytics results: ensure ml result fields are shown in data grid (elastic#68305)
  [security_solution] enable react-hooks/exhaustive-deps (elastic#68470)
  Closes elastic#66867 by adding missing, requried API params (elastic#68465)
  [Telemetry] collect number of visualization saved in the past 7, 30 and 90 days (elastic#67865)
  [Logs UI] View in context tweaks (elastic#67777)
  Kibana developer examples landing page (elastic#67049)
  Bump decompress package version (elastic#68386)
  fix elastic#66185 (elastic#66186)
  Bump pdfmake package version (elastic#68395)
  Unskip embeddables/adding_children suite (elastic#68111)
  Add embed mode options in the Share UI (elastic#58435)
  Adding key to avoid react warning (elastic#68491)
ppisljar added a commit that referenced this pull request Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.9.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error importing saved objects with conflicts Importing legacy json file throws index pattern exception

6 participants