elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.41k stars 24.56k forks source link

[Transform] return deprecation warnings for painless scripts in TransformDeprecationChecker #82936

Open hendrikmuhs opened 2 years ago

hendrikmuhs commented 2 years ago

Related to #82935:

A user creates a transform with deprecated syntax or the syntax gets deprecated at a later time. GETshould return deprecation warnings for painless scripts, so he can fix the script (for repro steps see #82935).

When parsing the transform configs, scripts aren't evaluated. GET does not return deprecation warnings.

Decision: Script compilation makes the call more expensive, despite script caching. If a GET targets all, we have to do a lot of compilation. At the moment we've decided that this is out of scope.

However the deprecation info API (TransformDeprecationChecker) should return deprecations, therefore compile scripts if necessary. The deprecation warnings should appear in the kibana upgrade assistant in 7.17.

Note: We need to discuss named scripts, they should probably handled directly by the deprecation info API, but not triggered from transform.

Target: This should go into the latest main branch and 7.17 to mainly fix the upgrade experience(7.17) but also have everything in place for future deprecations(main).

elasticmachine commented 2 years ago

Pinging @elastic/ml-core (Team:ML)