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

Warning when dashboard with visualisations by reference instead of value exist #316

Closed
ruflin opened this issue Apr 12, 2022 · 4 comments · Fixed by #389
Closed

Warning when dashboard with visualisations by reference instead of value exist #316

ruflin opened this issue Apr 12, 2022 · 4 comments · Fixed by #389
Assignees
Labels
Team:Ecosystem Label for the Packages Ecosystem team

Comments

@ruflin
Copy link
Contributor

ruflin commented Apr 12, 2022

In Kibana, dashboards can be built with visualisations inside stored by value or by reference. Historically only by reference was supported so most of our dashboards still use by reference. The goal is to move to by value to have dashboards and visualisations directly bundled together as a unit which speeds up the installation of it in Fleet and also makes sure the visualisations do not all show up in the search, only the dashboard.

To help with this effort and notify engineers about usage of by reference, it would be nice if during building a package, package-spec or the build process would show a warning if a visualisation in a dashboard is added by reference instead of by value. Changes should not be blocked on this but engineers notified about it.

This is related to elastic/kibana#129303 which should help engineers with an easy migration to by value.

@mrodm
Copy link
Contributor

mrodm commented Sep 13, 2022

I was checking the references that could be defined in dashboards, and currently these are the reference types that I found across all the packages:

  • dashboard
  • index-pattern
  • lens
  • map
  • search
  • tag
  • visualization

In #389 , just "lens" and "visualization" reference types were considered to show the warning. What other reference types should be checked to show this warning ?

I've been testing to add more elements to one dashboard by reference (in Kibana 8.0.0):

  • I was able to create a "map" reference from the dashboard edit view, and then unlink it.
  • Not sure "index-pattern" should be shown as a warning. In one of the dashboards that I did lately, that reference appeared even when all the visualizations were added by value.
  • Regarding "search", I was just able to add it from the library creating it previously in Discover. So I think there should not be needed a warning there.
  • "Tags" need to be created in advance (in Stack management), so I guess they should be always created as a reference.
  • I was not able to create a reference of type "dashboard".

@ruflin With that, should we consider to update this warning and show it just when there are references of types lens, visualization and maps?

@ruflin
Copy link
Contributor Author

ruflin commented Sep 13, 2022

@flash1293 Could you comment on the above. Should we strive for all assets to added by value? Is it even possible for all assets? Lets ignore index-patterns / data views for a moment as we will have a follow up discussion on that.

@flash1293
Copy link
Contributor

lens, visualization and map can go "by-value". All other types need to go by reference for now (excluding the data view discussion)

@mrodm
Copy link
Contributor

mrodm commented Sep 13, 2022

Perfect, I'll update the validation rule adding "map" here #414
Thanks @ruflin and @flash1293 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Ecosystem Label for the Packages Ecosystem team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants