mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-11 15:35:05 +00:00
Stored scripts are pulled from the cluster state, and the current api requires passing the ClusterState on each call to compile. However, this means every user of the ScriptService needs to depend on the ClusterService. Instead, this change makes the ScriptService a ClusterStateListener. It also simplifies tests a lot, as they no longer need to create fake cluster states (except when testing stored scripts).