-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Drop stored scripts with the old style-id #48078
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
Conversation
Pinging @elastic/es-core-infra (:Core/Infra/Scripting) |
@elasticmachine run elasticsearch-ci/packaging-sample |
@elasticmachine run elasticsearch-ci/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BytesReference.bytes(builder).streamInput()); | ||
ScriptMetaData smd = ScriptMetaData.fromXContent(parser); | ||
assertNull(smd.getStoredScript("painless#test")); | ||
assertNull(smd.getStoredScript("lang#test")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check the size of the Map returned from getStoredScripts()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Added.
@elasticmachine run elasticsearch-ci/2 |
1 similar comment
@elasticmachine run elasticsearch-ci/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@martijnvg @rjernst Thanks for the reviews! Will commit as soon as CI passes. |
@elasticmachine run elasticsearch-ci/packaging-sample |
@elasticmachine run elasticsearch-ci/2 |
This PR fixes (#47593). Stored scripts with the old-style id of lang#id are saved through the upgrade process but are no longer accessible in recent versions. This fix will drop those scripts altogether since there is no way for a user to access them.
This PR fixes (#47593). Stored scripts with the old-style id of lang#id are saved through the upgrade process but are no longer accessible in recent versions. This fix will drop those scripts altogether since there is no way for a user to access them.