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

[kql] Remove named args and unused geo functions #118973

Merged
merged 8 commits into from
Dec 13, 2021

Conversation

lukasolson
Copy link
Member

Summary

  • Simplifies the KQL (kuery) grammar & types by removing the namedArg node type.
  • Removes the unused geo_bounding_box and geo_polygon KQL functions.

The namedArg node type was used only by the range function to specify which operator was being used (<, <=, >, or >=). This was not necessary, as it can just be an additional argument to the function itself. Note that many of the tests that previously contained multiple inequality conditions were updated to only include one, as the grammar itself only supports this.

The geo_bounding_box and geo_polygon functions were vestiges of the very first version of the (experimental) Kibana query language (which was actually known as "Kuery"). These aren't supported in the current version of KQL (and haven't been for years).

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@lukasolson lukasolson added refactoring Feature:KQL KQL Team:AppServicesSv v9.0.0 auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Nov 17, 2021
@lukasolson lukasolson self-assigned this Nov 17, 2021
@elasticmachine
Copy link
Contributor

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

@lukasolson lukasolson added the release_note:skip Skip the PR/issue when compiling release notes label Nov 18, 2021
Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

code lgtm 👍
thanks for the deep dive explaining it

@Dosant
Copy link
Contributor

Dosant commented Dec 8, 2021

Code owners were not trigger. I think we need to add that package to .CODEOWNERS

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1071 1068 -3
dashboard 263 260 -3
data 509 506 -3
dataVisualizer 334 331 -3
fleet 553 550 -3
infra 920 917 -3
inputControlVis 104 101 -3
lens 732 729 -3
lists 297 294 -3
maps 807 804 -3
ml 1586 1583 -3
observability 341 338 -3
presentationUtil 284 281 -3
securitySolution 2818 2815 -3
timelines 287 284 -3
uptime 664 661 -3
visTypeTimelion 114 111 -3
visTypeVega 287 284 -3
total -54

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/es-query 162 160 -2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1013.2KB 1010.4KB -2.7KB
dashboard 275.1KB 272.4KB -2.7KB
dataVisualizer 538.1KB 535.4KB -2.7KB
fleet 644.6KB 641.9KB -2.7KB
infra 991.3KB 988.6KB -2.7KB
inputControlVis 80.5KB 77.8KB -2.7KB
lens 1.1MB 1.1MB -2.7KB
lists 143.3KB 140.6KB -2.7KB
maps 2.6MB 2.6MB -2.7KB
ml 3.5MB 3.5MB -2.7KB
observability 362.1KB 362.1KB -4.0B
presentationUtil 232.8KB 230.1KB -2.7KB
securitySolution 4.6MB 4.6MB -4.0B
timelines 229.7KB 227.0KB -2.7KB
uptime 683.3KB 680.5KB -2.7KB
visTypeTimelion 124.0KB 121.3KB -2.7KB
visTypeVega 2.0MB 1.9MB -2.7KB
total -40.7KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/es-query 12 11 -1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 443.7KB 441.0KB -2.7KB
observability 80.3KB 77.6KB -2.7KB
securitySolution 244.9KB 242.1KB -2.7KB
total -8.1KB
Unknown metric groups

API count

id before after diff
@kbn/es-query 214 212 -2

History

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

cc @lukasolson

@lukasolson lukasolson merged commit 3573988 into elastic:main Dec 13, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
9.0 The branch "9.0" is invalid or doesn't exist

To backport manually run:
node scripts/backport --pr 118973

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 15, 2021
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 118973 or prevent reminders by adding the backport:skip label.

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 118973 or prevent reminders by adding the backport:skip label.

@lukasolson lukasolson removed backport missing Added to PRs automatically when the are determined to be missing a backport. auto-backport Deprecated - use backport:version if exact versions are needed labels Dec 16, 2021
@lukasolson lukasolson added the backport:skip This commit does not require backporting label Dec 16, 2021
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
* [kql] Remove named args and unused geo functions

* Fix tests

* Re-format grammar output
@jbudz jbudz added backport:skip This commit does not require backporting and removed backport:skip This commit does not require backporting v9.0.0 labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:KQL KQL refactoring release_note:skip Skip the PR/issue when compiling release notes v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants