OpenSearch/elasticsearch
Martijn van Groningen b74f1e6cb2 watcher: Add limited capability to upgrade the source of a watcher upon startup.
This particular change focuses on upgrading the source of a watch when it comes to scripts that have no language specified explicitly.
The default language in version 5 changed to painless from whatever is specified in `script.default_lang` setting (this defaulted to groovy). In order to make sure that scripts in watcher remain to work we should rewrite the search source upon startup and set the legacy default language explicitly. The legacy script language is now controlled by `script.legacy.default_lang` setting and that defaults to groovy.

Changing the source upon startup should do the trick and only change the source of watches with scripts that don't have an explicit language set. For new watches the default language used in scripts is painless and because we now always serialize the language explicitly in scripts these watches won't be changed on startup.

 The upgrade logic added here tries to upgrade scripts in the following places in a watch:
 * script condition
 * script transform
 * any script defined inside of a search input

Original commit: elastic/x-pack-elasticsearch@4d578819eb
2016-09-09 14:26:24 +02:00
..
license-tools Build: Add task to build zip of license tools 2016-08-16 14:23:56 -07:00
qa [Monitoring] Use Low Level REST Client for HTTP Exporter 2016-09-05 15:16:03 -04:00
x-dev-tools Fix remaining fractional TimeValue issues with watcher 2016-09-06 09:53:22 -04:00
x-pack watcher: Add limited capability to upgrade the source of a watcher upon startup. 2016-09-09 14:26:24 +02:00
x-pack-transport add a PreBuiltXPackTransportClient 2016-09-01 13:49:10 -04:00
build.gradle add a PreBuiltXPackTransportClient 2016-09-01 13:49:10 -04:00
checkstyle_suppressions.xml Remove suppression and implement hashCode 2016-02-09 21:49:13 -05:00