Skip to content

Scripting: Remove file scripts#24627

Merged
rjernst merged 15 commits intoelastic:masterfrom
rjernst:remove_file_scripts
May 17, 2017
Merged

Scripting: Remove file scripts#24627
rjernst merged 15 commits intoelastic:masterfrom
rjernst:remove_file_scripts

Conversation

@rjernst
Copy link
Copy Markdown
Member

@rjernst rjernst commented May 11, 2017

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

closes #21798

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

closes elastic#21798
@rjernst rjernst added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >breaking v6.0.0 labels May 11, 2017
@jasontedor jasontedor self-requested a review May 11, 2017 18:19
Copy link
Copy Markdown
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments, nothing major.

createFileScripts("dtest");

for (ScriptContext scriptContext : scriptContexts) {
// only file scripts are accepted by default
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment can go.


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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments about file scripts can go.

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());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@@ -71,7 +70,6 @@ public class ScriptServiceTests extends ESTestCase {
private static final Map<ScriptType, Boolean> DEFAULT_SCRIPT_ENABLED = new HashMap<>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

//TODO: this needs to be a base test class, and all scripting engines extend it
public class ScriptServiceTests extends ESTestCase {

private ResourceWatcherService resourceWatcherService;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are imports up above that can be removed.

@@ -225,19 +176,11 @@ public void testDefaultBehaviourFineGrainedSettings() throws IOException {
deprecate = true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can go?

@jasontedor
Copy link
Copy Markdown
Member

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

@rjernst
Copy link
Copy Markdown
Member Author

rjernst commented May 11, 2017

@elasticmachine retest this please

@rjernst
Copy link
Copy Markdown
Member Author

rjernst commented May 16, 2017

@jasontedor Packaging tests are updated.

Copy link
Copy Markdown
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

jrodewig added a commit that referenced this pull request Dec 20, 2019
File scripts were removed in 6.0 with #24627.

This removes an outdated file scripts reference from the conditional clauses section of the search templates docs.
jrodewig added a commit that referenced this pull request Dec 20, 2019
File scripts were removed in 6.0 with #24627.

This removes an outdated file scripts reference from the conditional clauses section of the search templates docs.
jrodewig added a commit that referenced this pull request Dec 20, 2019
File scripts were removed in 6.0 with #24627.

This removes an outdated file scripts reference from the conditional clauses section of the search templates docs.
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
File scripts were removed in 6.0 with elastic#24627.

This removes an outdated file scripts reference from the conditional clauses section of the search templates docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>breaking :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v6.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should we remove file-based scripts and templates?

3 participants