Skip to content
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

Throw error when create is used with external #37900

Closed
wants to merge 3 commits into from

Conversation

ivange94
Copy link

op_type create should only be used with version_type
external

Closes #37855

@ivange94
Copy link
Author

I have not added unit tests yet. This is only because I'm not able to run unit tests from InteliJ. When I try to run ReindexRequestTests I get a build error.

screen shot 2019-01-26 at 1 43 54 pm

@ywelsch ywelsch added the :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. label Jan 28, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@ywelsch ywelsch self-requested a review January 28, 2019 13:10
@ywelsch
Copy link
Contributor

ywelsch commented Jan 30, 2019

@ivange94 can you run tests from other subprojects, e.g. the server module? Have you tried running ./gradlew idea before importing the project into IntelliJ and then done a gradle refresh inside IntelliJ?

@ivange94
Copy link
Author

ivange94 commented Feb 3, 2019

@ywelsch sorry for my delayed response on this. Not been on my laptop for a while now.

I was finally able to run ReindexRequestTests. Not sure what fixed it but before doing that I first ran a test in the server module which succeeded then running ReindexRequestTests succeeded too so I'm not sure if that was the fix but I'm moving ahead with the issue

@ivange94
Copy link
Author

ivange94 commented Feb 5, 2019

@ywelsch I've added test for this. Patiently awaiting your review 😄

@ivange94
Copy link
Author

ivange94 commented Feb 7, 2019

@ywelsch seeing that you just pushed a commit that fixes this. Should I close this PR?

@ywelsch
Copy link
Contributor

ywelsch commented Feb 7, 2019

I'm exploring a more generic solution in #38504, taking into account some of the other version-based checks as well (so that we can avoid problems like this in the future), and dealing with the very recent changes around compare-and-set style versioning. I'm not sure yet whether that solution all works out, so let's keep this one open until I complete #38504.

@ywelsch
Copy link
Contributor

ywelsch commented Feb 8, 2019

@ivange94 unfortunately the solution explored in #38504 did not work. Can you merge latest master into this branch and I will trigger a CI run.

op_type create should only be used with version_type
external

Closes elastic#37855
@ivange94
Copy link
Author

ivange94 commented Feb 8, 2019

Can you merge latest master into this branch

@ywelsch Done

@ywelsch
Copy link
Contributor

ywelsch commented Feb 8, 2019

@elasticmachine test this please

@ivange94
Copy link
Author

@ywelsch I'm not sure why the two builds above are failing.

@ywelsch
Copy link
Contributor

ywelsch commented Feb 12, 2019

@elasticmachine test this please

@ywelsch
Copy link
Contributor

ywelsch commented Feb 12, 2019

I've merged latest master into your branch, which will hopefully fix the CI issue

@ywelsch
Copy link
Contributor

ywelsch commented Feb 13, 2019

This looks to be a relevant test failures:

ERROR 0.32s | CRUDDocumentationIT.testReindex <<< FAILURES!
Throwable #1: org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: create operations only support internal versioning. use index instead;
at __randomizedtesting.SeedInfo.seed([B4C3EF6C5B9EEEAC:27B9B180D9CB54FE]:0)
at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:26)
at org.elasticsearch.index.reindex.ReindexRequest.validate(ReindexRequest.java:110)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1399)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1373)
at org.elasticsearch.client.RestHighLevelClient.reindex(RestHighLevelClient.java:499)
at org.elasticsearch.client.documentation.CRUDDocumentationIT.testReindex(CRUDDocumentationIT.java:877)
at java.lang.Thread.run(Thread.java:748)

reproduce with ./gradlew :client:rest-high-level:integTestRunner -Dtests.seed=B4C3EF6C5B9EEEAC -Dtests.class=org.elasticsearch.client.documentation.CRUDDocumentationIT -Dtests.method="testReindex" -Dtests.security.manager=true -Dtests.locale=es-MX -Dtests.timezone=America/El_Salvador -Dcompiler.java=11 -Druntime.java=8

@ivange94
Copy link
Author

@ywelsch I'm having a bit of a trouble here. I can't see my commits locally anymore. I had some trouble with my virtual machine so I had to setup a new one. I've cloned this repo and fetched this branch but when I do git checkout issue-37855, the only commit I see at the top is your merge commit Merge remote-tracking branch 'elastic/master' into pr/37900.

@henningandersen henningandersen added :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down and removed :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. labels Apr 12, 2019
@henningandersen
Copy link
Contributor

@ivange94 I checked your branch and found both the previous commits. They are somewhat down the list since they were from jan 27 and feb 5:

https://github.com/ivange94/elasticsearch/commits/issue-37855?before=5f0d8e7459ac87e6504320cca19a088d76f6e0e4+70

(search in page for ivange94).

Do you want to pick this up again and look into above test failure? It is probably advisable to merge in master first.

@ivange94
Copy link
Author

ivange94 commented Jul 4, 2019

@henningandersen yes I'd look at this some more. I wasn't able to run the failed tests from my IDE so I can debug. I'll try again.

@ywelsch
Copy link
Contributor

ywelsch commented Nov 27, 2019

Any updates on this?

@ywelsch
Copy link
Contributor

ywelsch commented Dec 3, 2019

I'm closing this because of inactivity. @ivange94 We can reopen the PR whenever you would like to pick this up again.

@ywelsch ywelsch closed this Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reindex can ignore op_type create when using external version
4 participants