-
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
[Scripted Fields] No inline scripting languages are shown #11959
Comments
I've traced the cause of this Kibana bug to this change in Elasticsearch: elastic/elasticsearch@1196dfb. Given this change, Kibana will now need to figure out the list of enabled inline scripting languages some other way. @jdconrad do you know if there's another Elasticsearch API Kibana could call now to generate this list for the user? |
By default all scripting languages will be inline enabled now since we no longer have languages without a sandbox. However, users can both disable script types and script contexts. The settings for those are script.allowed_types and script.allowed_contexts. Sorry for the inconvenience here. These settings changes are important for work @rjernst and I are doing to improve scripting performance and user experience. |
@jdconrad helped me understand script types and contexts (thanks Jack!). Based on my understanding, Kibana code that shows the list of scripting languages needs to do the following now:
|
On issue 3, i I was thinking the same thing as soon as I realized Kibana was depending on the settings for what languages existed. I will have to think about the best way to do this. |
* Fix use of KuiButtons in Clone Modal. * [scripts] stub scripts/languages api until elastic#11959 is fixed
@ycombinator @jdconrad any news here? |
Apologies, I've been heavily bogged down by script contexts lately. We should probably add something like /_scripts that will return all the script engines and what contexts they support and possibly what settings are enabled. |
Note that in 6.0, there is no more "disabling" script languages. So whatever script engines we have are available. I think this could be hardcoded in kibana at first (painless and expression). I don't see exposing which script engines are installed as a priority. |
This is also a blocker in 5.5.0 now. |
@marius-dr The Elasticsearch API changed in 5.5? |
I've confirmed with @marius-dr that this is not a problem in 5.5 after all. |
I talked about this with @ycombinator and we agreed that this is not a blocker for 6.0.0. The solution @spalger added is sufficient for 6.0.0 and we'll readdress this once/if there is a better way. |
@spalger @rjernst Sorry to dig this one up again but the workaround with the hardcoded language array in the API is still in place. Is there a way to fetch supported languages by now (didn't see anything in the docs)? If not we should at least implement @ycombinator suggestion 1 and 2 from #11959 (comment) , right? This comes up because we are in the process of moving those parts to the Kibana platform. I'm more than happy to ditch the check completely, but it seems like it makes a lot of sense and the absence is a bug in the current product. |
@flash1293 We've added the API with 426c7a5 in 7.6 and 4a07802 in 8.0. Let's chat about how to use this when you get around to it. |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
I'm closing this as Scripted Fields are deprecated in favor of runtime fields. |
When users attempt to create a scripted field in Kibana, they are supposed to be shown a list of inline scripting languages enabled in Elasticsearch. This list used to show languages such as "painless" and "expression". Now (with the latest Elasticsearch
master
build) this list is empty:The list is populated by Kibana by calling the http://localhost:9200/_cluster/settings?include_defaults=true&filter_path=**.script.engine.*.inline Elasticsearch API at this point in the code.
This API call used to return a response like this:
The same API call now returns:
The text was updated successfully, but these errors were encountered: