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

Migrated tag cloud from 5.6.16 displays error in 7.10/7.11 #83876

Closed
bhavyarm opened this issue Nov 19, 2020 · 5 comments · Fixed by #84107
Closed

Migrated tag cloud from 5.6.16 displays error in 7.10/7.11 #83876

bhavyarm opened this issue Nov 19, 2020 · 5 comments · Fixed by #84107
Labels
bug Fixes for quality problems that affect the customer experience Feature:Tagcloud Tag cloud visualization feature Feature:Visualizations Generic visualization features (in case no more specific feature label is available) patch-worthy regression Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Nov 19, 2020

Kibana version: 5.6.16->7.10.0/7.11.0

Elasticsearch version: 5.6.16->7.10.0/7.11.0

Server OS version: darwin_x86_64

Browser version: chrome latest

Browser OS version: OS X

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

Describe the bug: Tag cloud saved object (migrated from 5.6.16) errors out on the display in 7.10/7.11

Steps to reproduce:

  1. Get 5.16.16 stack up - ingest load sample logstash data from here (https://www.elastic.co/guide/en/kibana/5.6/tutorial-load-dataset.html)
  2. Create a tag cloud with logstash data - I used geo.src.keyword -
  3. Use the upgrade assistant and then do a rolling upgrade to 6.8.13 - tag cloud opens without any problems
  4. Do a rolling upgrade from 6.8.13 to 7.10.0/7.11.0 - tag cloud displays error

I have attached the saved json to the bug - export_tag_cloud.json.txt

Search Error

Unknown argument 'type' passed to function 'tagcloud'

Error: Unknown argument 'type' passed to function 'tagcloud'
at http://localhost:5601/36580/bundles/plugin/expressions/expressions.plugin.js:1:67601
at http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:421:6364
at http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:421:28176
at lr (http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:421:17621)
at http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:421:27981
at Tt (http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:421:6330)
at On.reduce (http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:421:62551)
at _callee4$ (http://localhost:5601/36580/bundles/plugin/expressions/expressions.plugin.js:1:67460)
at l (http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:1751401)
at Generator._invoke (http://localhost:5601/36580/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:1751154)

Screenshots (if relevant):
Screen Shot 2020-11-19 at 6 39 11 PM

@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Tagcloud Tag cloud visualization feature Feature:Saved Objects labels Nov 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@pgayvallet pgayvallet removed the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Nov 20, 2020
@pgayvallet
Copy link
Contributor

pgayvallet commented Nov 20, 2020

Forwarding to @elastic/kibana-app-services as the error is thrown from the expression plugin. Seems like it might be that the registered SO migrations for the type from 5.6.16 to 7.10.0 might be in cause, at it seems the object is in an invalid state on 7.10.0

@lukeelmers
Copy link
Member

The error that's coming from the expressions service suggests that the tagcloud expression function is receiving an unexpected type argument. This makes sense, as the visState from the migrated saved object appears to have "type" duplicated in the params, and the params are passed straight through to the expression function in tagcloud's to_ast.ts:

{
  "title": "tag_cloud",
  "type": "tagcloud",
  "params": {
    "scale": "linear",
    "orientation": "single",
    "minFontSize": 18,
    "maxFontSize": 72,
    "type": "tagcloud" // <-- This is what's causing the error
  },
  "aggs": [...],
  "listeners": {...}
}

cc @sulemanof -- I wonder if this was an accidental regression from #77910, as the 7.9 implementation of build_pipeline was picking specific args to include in the tagcloud expression function, whereas the 7.10 to_ast implementation just passes through whatever params are on the vis.

A shorter-term fix would be explicitly pulling out the known args inside to_ast, but longer term it would be worth considering a SO migration to remove the unneeded type from the params.

@lukeelmers lukeelmers added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure regression and removed Feature:Saved Objects Team:AppServices labels Nov 20, 2020
@lukeelmers
Copy link
Member

Pinging @elastic/kibana-app (since I guess elasticmachine forgot to?) 🤷‍♂️

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:Tagcloud Tag cloud visualization feature Feature:Visualizations Generic visualization features (in case no more specific feature label is available) patch-worthy regression Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants