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

Fix importing dashboards created before ~6.1.0 #94332

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Mar 10, 2021

Summary

Fixes #93772
Regression introduced in #82602

How to test

  1. Create a dashboard with a panel before 6.1
  2. Import it into 7.11+ using SO mgmt UI
  3. Open a dashboard

Before fix:
No panels on a dashboard. Client-side error.

**After the fix: **
The panel is shown and ideally working (unless there is some other unrelated migration issue because of the visualization/indexpattern)

Fix details

More context is here: #93772,
but the fix, in a nutshell, is to skip an extractReferences code path which we know is supported only for >7.3.0 panels.

Release Notes

Fixed importing dashboards created before 6.1.0 version

Checklist

For maintainers

@Dosant Dosant changed the title Old dashboard import fix Fix importing dashboards created before ~6.1.0 Mar 11, 2021
@Dosant Dosant added v7.11.3 v7.12.0 v7.13.0 v8.0.0 bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame regression release_note:fix labels Mar 11, 2021
@Dosant Dosant marked this pull request as ready for review March 11, 2021 15:35
@Dosant Dosant requested a review from a team as a code owner March 11, 2021 15:35
@kibanamachine kibanamachine added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Mar 11, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@Dosant Dosant requested review from ThomThomson, streamich and a team March 11, 2021 15:36
@Dosant Dosant added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Mar 11, 2021
Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Skipping extractReferences for panels older than 7.3.0 makes a lot of sense.

All the tests here look great! Thanks again for tackling this Anton.

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

I'm just curious about the exports location. Both archivers (kbnarchiver & esarchiver) have locations that are documented. Should this be similar?

await PageObjects.settings.navigateTo();
await PageObjects.settings.clickKibanaSavedObjects();
await PageObjects.savedObjects.importFile(
path.join(__dirname, 'exports', 'dashboard_6_0_1.json')
Copy link
Member

Choose a reason for hiding this comment

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

Is this a common location for an export?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH, I am not sure what is the best practice. I followed another example I found where saved object import was used:
https://github.com/elastic/kibana/blob/master/test/functional/apps/management/exports/mgmt_import_objects.json

@bhavyarm
Copy link
Contributor

LGTM pulled it down and tested it. Will be testing it again in the next 7.12 BC. Thanks @Dosant

@Dosant
Copy link
Contributor Author

Dosant commented Mar 15, 2021

@elasticmachine merge upstream

@Dosant Dosant removed the v7.11.3 label Mar 15, 2021
@Dosant Dosant force-pushed the dev/dashboard-import-fix branch from 870dfd9 to 1452b69 Compare March 15, 2021 10:34
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
dashboard 189.3KB 165.8KB -23.5KB

Page load bundle

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

id before after diff
dashboard 311.0KB 334.7KB +23.8KB

History

  • 💔 Build #113023 failed 870dfd9e8181e055315638e3092035094364d254
  • 💚 Build #112733 succeeded 04bcb4bdc812a3c6a4692c90e3b64a1931cbf072
  • 💚 Build #112544 succeeded dcc6c669bf5d2fd3395383e70b1a097537065f73
  • 💔 Build #112534 failed 2c058853b3a2dca8e6a210789893273e59b749ee

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort regression release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard migration to 7.11 fails
6 participants