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

Disallow legacy visualizations #610

Merged
merged 24 commits into from
Sep 28, 2023
Merged

Conversation

drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented Sep 22, 2023

What does this PR do?

Fails when any legacy Kibana visualizations are detected in a package.

Why is it important?

We would like to migrate away from legacy visualizations to give our customers a better experience and decrease the maintenance burden of so many editors.

Checklist

Related issues

@drewdaemon drewdaemon changed the title detect legacy visualization in dashboards Fail on legacy visualizations Sep 27, 2023
@drewdaemon
Copy link
Contributor Author

@jsoriano , @mrodm make test is passing locally.

CI errors seem to point to some Go module related issue. Do you have any guidance to offer?

@drewdaemon drewdaemon marked this pull request as ready for review September 27, 2023 19:45
@drewdaemon drewdaemon requested a review from a team as a code owner September 27, 2023 19:45
@drewdaemon drewdaemon changed the title Fail on legacy visualizations Disallow legacy visualizations Sep 27, 2023
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! Added a couple of comments about safer type conversions and checking all visualizations and dashboards even if one fails.

jsoriano
jsoriano previously approved these changes Sep 27, 2023
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@elastic elastic deleted a comment from elasticmachine Sep 27, 2023
@elasticmachine
Copy link

💚 Build Succeeded

@drewdaemon
Copy link
Contributor Author

@elastic/ecosystem as far as I'm concerned, this PR is ready to be merged. Feel free to do so if you approve. Thanks!

@jlind23 jlind23 requested a review from mrodm September 28, 2023 06:20
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@jsoriano jsoriano merged commit 49120ae into main Sep 28, 2023
3 checks passed
@jsoriano jsoriano deleted the legacy-visualization-validation branch September 28, 2023 07:43
@@ -140,6 +140,7 @@ func (s Spec) rules(pkgType string, rootSpec spectypes.ItemSpec) validationRules
{fn: semantic.ValidateRoutingRulesAndDataset, types: []string{"integration"}, since: semver.MustParse("2.9.0")},
{fn: semantic.ValidateKibanaNoDanglingObjectIDs, since: semver.MustParse("3.0.0")},
{fn: semantic.ValidateKibanaFilterPresent, since: semver.MustParse("3.0.0")},
{fn: semantic.ValidateKibanaNoLegacyVisualizations, types: []string{"integration"}, since: semver.MustParse("3.0.0")},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this rule be limited to type "integration"?

Copy link
Contributor

Choose a reason for hiding this comment

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

That should we ok, since input packages are not allowed to have kibana assets, just integration packages.
https://github.com/elastic/package-spec/blob/49120aea627a1652823a7f344ba3d1c9b029fd5a/spec/input/spec.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning when TSVB instead of Lens is used
4 participants