-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
…egacy-visualization-validation
There was a problem hiding this 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.
code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go
Show resolved
Hide resolved
code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go
Outdated
Show resolved
Hide resolved
code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go
Outdated
Show resolved
Hide resolved
code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go
Outdated
Show resolved
Hide resolved
code/go/internal/validator/semantic/validate_kibana_no_legacy_visualizations.go
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
|
@elastic/ecosystem as far as I'm concerned, this PR is ready to be merged. Feel free to do so if you approve. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
@@ -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")}, |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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
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
test/packages
that prove my change is effective.spec/changelog.yml
.Related issues