-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Update painless autocomplete definitions #85464
Update painless autocomplete definitions #85464
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Distributable file count
Unknown metric groups@kbn/ui-shared-deps asset size
History
To update your PR or re-run it, just comment with: |
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.
This is a fantastic change! Great job @alisonelizabeth .
Tested locally and confirmed that painless autocomplete still works as expected.
This PR updates the painless autocomplete definitions.
Note: the script was run against ES
master
; the generated context definitions in ES are currently the same inmaster
and7.x
, so it should not need to be run again against7.x
for this release.Related to elastic/elasticsearch#66050, elastic/elasticsearch#66120
Background
Each painless context has a set of shared classes that previously was represented in each context definition. This created large autocomplete definition files (~1MB) per context (more info around this here: #80577 (comment)). With the support of elastic/elasticsearch#66050, there is now a "common" file with common classes, and each context only contains the specialized classes associated with it. The UI code concats the common classes with context-specific classes to form the autocomplete suggestions list.
Other changes to note:
The generated definition files now exclude primitive types (e.g.,
boolean
,int
,char
). We already have defined these values in the lexer_rules, so we grab the values from there to populate the autocomplete suggestions.How to test
I don't expect all classes and contexts to be tested 😄, but if you can do a quick smoke test of the autocomplete functionality that would be helpful. There is existing test coverage to verify the suggestions are still in the correct format.