-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Delete deprecated getValues from ScriptDocValues #36183
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
First commit addressing issue elastic#22919. `ScriptDocValues#getValues` was added for backwards compatibility but no longer needed. Scripts using the syntax `doc['foo'].values` when `doc['foo']` is a list should be using `doc['foo']` instead.
* Removes unused import in ScriptDocValuesDatesTest * Removes used of `.values` in example in diversified-sampler-aggregation.asciidoc
…te in ScriptDocValues.GeoPoints.
|
Pinging @elastic/es-core-infra |
nik9000
left a comment
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.
Could you add a note to docs/reference/migration/migrate_7_0/scripting.asciidoc to call out this removal?
server/src/main/java/org/elasticsearch/index/fielddata/ScriptDocValues.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| public double[] getLats() { | ||
| List<GeoPoint> points = getValues(); |
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.
This change we probably should backport!
|
Thanks for doing this @j-haj! That change to |
|
@nik9000 Great! I will make the requested updates today |
|
@nik9000 in the migration file, what versions should I use for deprecated and removed? Deprecated in 6.6, removed 7.0? I don't have a good sense for Elastic release cycles. |
Those are exactly the right versions. We'll branch master into 7.x and 7.0 at some point and start releasing from them. We're intentionally pretty quiet about when release because we don't like to disappoint folks. But you can be quite sure that something in the 6.6 branch is bound to be released in 6.6.0 and that master will become 7.0.0. |
|
@j-haj I pushed a small change to fix the compilation after your javadoc change and merged master. |
|
@elasticmachine, test this please |
|
@nik9000 that's embarrassing - I should have caught that... looking at the logs it looks like I missed some |
|
Thanks @j-haj! I'm sorry the build is so bumpy now. Our CI is having trouble being green and we have a few folks fighting with it today and yesterday. |
|
I merged master locally and am now seeing failures from |
|
@j-haj, push the merge and I can try it and look at the error. |
…into issue-22919
|
Let's see what @elasticmachine thinks: test this please |
|
Looks like an issue with the Jenkins build script |
|
@elasticmachine, retest this please. You had problems that last time you tried. |
|
@j-haj, I'm not sure what is up with the build here. Locally I get the same failures. I tracked the failure down by doing: Which had an error that made me think there'd be an easier way to reproduce. So I did: And, like magic, the first test failed with: Which is totally related to your change and fixable by removing that method from the painless whitelist. Now, all of the other painless tests failed with a can't load a class error because class loading bailed on the previous error. Which isn't great, but at least I found the error. |
|
Thanks! I will fix this now and see what happens |
|
I made the change and did a clean build and am now rerunning the tests (for about the past 2 hours). So far so good... |
|
@nik9000 All tests are passing locally on the latest push |
|
@elasticmachine, test this please! |
|
@elasticmachine, test this again now that I've merged master into it. |
|
@elasticmachine, test this please |
|
And merged after everything passed! Thanks @j-haj! |
Second PR for #22919. This PR removes the following:
getValuesmethod fromScriptDocValuesabstract classgetValuesfrom the concrete subclassesdoc[foo].values(replaced withdoc[foo])getValuesthroughout the code base (in reference to a subclass ofScriptDocValues)