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

Scripting: Remove file scripts #24627

Merged
merged 15 commits into from May 17, 2017

Conversation

Projects
None yet
3 participants
@rjernst
Member

rjernst commented May 11, 2017

This commit removes file scripts, which were deprecated in 5.5.

closes #21798

Scripting: Remove file scripts
This commit removes file scripts, which were deprecated in 5.5.

closes #21798
@jasontedor

I left some comments, nothing major.

Show outdated Hide outdated core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java
Show outdated Hide outdated core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java
for (ScriptType scriptType : ScriptType.values()) {
//make sure file scripts have a different name than inline ones.
//Otherwise they are always considered file ones as they can be found in the static cache.
String script = scriptType == ScriptType.FILE ? "file_script" : "script";
String script = "script";
for (ScriptContext scriptContext : this.scriptContexts) {
//fallback mechanism: 1) engine specific settings 2) op based settings 3) source based settings
Boolean scriptEnabled = engineSettings.get(dangerousScriptEngine.getType() + "." + scriptType + "." + scriptContext.getKey());

This comment has been minimized.

@jasontedor

jasontedor May 11, 2017

Member

It won't let me review line 278 where there is still an assertion about file scripts.

@jasontedor

jasontedor May 11, 2017

Member

It won't let me review line 278 where there is still an assertion about file scripts.

@@ -71,7 +70,6 @@
private static final Map<ScriptType, Boolean> DEFAULT_SCRIPT_ENABLED = new HashMap<>();

This comment has been minimized.

@jasontedor

jasontedor May 11, 2017

Member

There's a field up there scriptsFilePath that I think can go?

@jasontedor

jasontedor May 11, 2017

Member

There's a field up there scriptsFilePath that I think can go?

@@ -56,7 +56,6 @@
//TODO: this needs to be a base test class, and all scripting engines extend it
public class ScriptServiceTests extends ESTestCase {
private ResourceWatcherService resourceWatcherService;

This comment has been minimized.

@jasontedor

jasontedor May 11, 2017

Member

There are imports up above that can be removed.

@jasontedor

jasontedor May 11, 2017

Member

There are imports up above that can be removed.

Show outdated Hide outdated core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java
@jasontedor

This comment has been minimized.

Show comment
Hide comment
@jasontedor

jasontedor May 11, 2017

Member

Also, I think there are some packaging tests that set up a file script?

Member

jasontedor commented May 11, 2017

Also, I think there are some packaging tests that set up a file script?

@rjernst

This comment has been minimized.

Show comment
Hide comment
@rjernst

rjernst May 11, 2017

Member

@elasticmachine retest this please

Member

rjernst commented May 11, 2017

@elasticmachine retest this please

@rjernst

This comment has been minimized.

Show comment
Hide comment
@rjernst

rjernst May 16, 2017

Member

@jasontedor Packaging tests are updated.

Member

rjernst commented May 16, 2017

@jasontedor Packaging tests are updated.

@jasontedor

LGTM.

@rjernst rjernst merged commit 463fe2f into elastic:master May 17, 2017

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci Build finished.
Details

@rjernst rjernst deleted the rjernst:remove_file_scripts branch May 17, 2017

@clintongormley clintongormley added v6.0.0-beta1 and removed v6.0.0 labels Jul 25, 2017

joschi added a commit to joschi/elasticsearch-maven-plugin that referenced this pull request Sep 6, 2017

Remove pathScripts setting
The functionality to load scripts from files has been removed in Elasticsearch 6.x.

Refs elastic/elasticsearch#24627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment