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

[Lens] Fix empty dimensions after upgrading from pre-7.7 #62707

Closed
wants to merge 1 commit into from

Conversation

wylieconlon
Copy link
Contributor

When loading a saved XY Lens visualization that was created pre-7.7, such as bar chart, line chart, or area chart, the configuration panel on the right would show empty dimensions like this:

Screenshot 2020-04-03 18 22 48

The bug was caused by a change to how dimensions are represented that I introduced in #58279

The way I fixed this bug was by calling the initialize function when visualizations are loaded form a saved state, until the visualization returns an equal state.

Fixes #61939

Checklist

@wylieconlon wylieconlon added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Lens v7.7.0 v7.8.0 labels Apr 6, 2020
@wylieconlon wylieconlon requested review from timroes, flash1293, mbondyra and a team April 6, 2020 20:52
@elasticmachine
Copy link
Contributor

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

@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / x-pack-intake-agent / X-Pack Jest Tests.x-pack/legacy/plugins/lens/public/xy_visualization.xy_visualization #initialize removes dimensions from saved state if they are not on datasource

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

TypeError: Cannot read property 'getOperationForColumnId' of undefined
    at map (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/legacy/plugins/lens/public/xy_visualization/xy_visualization.tsx:137:43)
    at Array.map (<anonymous>)
    at Object.initialize (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/legacy/plugins/lens/public/xy_visualization/xy_visualization.tsx:134:30)
    at Object.it (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/legacy/plugins/lens/public/xy_visualization/xy_visualization.test.ts:116:30)
    at Object.asyncJestTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)
    at resolve (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
    at new Promise (<anonymous>)
    at mapper (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
    at promise.then (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/queueRunner.js:73:41)

Kibana Pipeline / x-pack-intake-agent / X-Pack Jest Tests.x-pack/legacy/plugins/lens/public/xy_visualization.xy_visualization #initialize keeps dimensions from saved state if they are in datasource

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

TypeError: Cannot read property 'getOperationForColumnId' of undefined
    at Object.it (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/legacy/plugins/lens/public/xy_visualization/xy_visualization.test.ts:133:37)
    at Object.asyncJestTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)
    at resolve (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/queueRunner.js:43:12)
    at new Promise (<anonymous>)
    at mapper (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/queueRunner.js:26:19)
    at promise.then (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-jasmine2/build/queueRunner.js:73:41)

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

@wylieconlon
Copy link
Contributor Author

Will look at doing this in a migration instead

@wylieconlon wylieconlon mentioned this pull request Apr 7, 2020
1 task
@wylieconlon
Copy link
Contributor Author

Using migration

@wylieconlon wylieconlon closed this Apr 8, 2020
@wylieconlon wylieconlon deleted the lens/fix-loading branch April 8, 2020 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0 v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lens visualization upgraded from 7.5 shows empty dimension panels and broken series names
3 participants