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

Migration of dashboard fails due to missing panelIndex property #44639

Closed
kertal opened this issue Sep 3, 2019 · 2 comments · Fixed by #44793
Closed

Migration of dashboard fails due to missing panelIndex property #44639

kertal opened this issue Sep 3, 2019 · 2 comments · Fixed by #44793
Labels
bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kertal
Copy link
Member

kertal commented Sep 3, 2019

Kibana version:
7.3.1
Elasticsearch version:
7.3.1

Original install method (e.g. download page, yum, from source, etc.):
docker

Describe the bug:
When migrating a dashboard like the following in it's 6.8 version to 7.3.1

{
          "dashboard" : {
            "hits" : 0,
            "timeFrom" : "now-24h",
            "timeTo" : "now",
            "description" : "",
            "uiStateJSON" : "{}",
            "title" : "fancy stuff",
            "timeRestore" : true,
            "version" : 1,
            "panelsJSON" : """[{"id":"funky-funky","type":"visualization","size_x":7,"size_y":5,"col":1,"row":1},{"id":"funky-funky2","type":"search","size_x":5,"size_y":5,"col":8,"row":1,"columns":["_source"],"sort":["@timestamp","desc"]}]""",
            "optionsJSON" : """{"darkTheme":false}""",
            "kibanaSavedObjectMeta" : {
              "searchSourceJSON" : """{"filter":[{"query":{"query_string":{"query":"user:spiderman","analyze_wildcard":true}}}]}"""
            }
          },
          "type" : "dashboard"
        }

the migration fails due to the missing panelIndex in the panelsJSON array

here's the relevant error in the log:

{"type":"log","@timestamp":"2019-09-02T15:52:07Z","tags":["warning","migrations"],"pid":7,"message":"Exception @ migrations730 while trying to migrate dashboard panels!\nError: TypeError: Cannot read property 'toString' of undefined\n    at migratePre61PanelToLatest ......

This error is caught, but then the migration process tries to insert the unchanged document, which leads to the following error

Error: mapping set to strict, dynamic introduction of [uiStateJSON] within [dashboard] is not allowed

A successful migration would have removed that property, but now migration is failing due to the strict mapping restriction.

@kertal kertal added bug Fixes for quality problems that affect the customer experience Feature:Saved Objects Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Sep 3, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@kertal kertal added Feature:Dashboard Dashboard related features Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Feature:Saved Objects Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Sep 3, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

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 Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants