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

[Remove] types based addMapping method from CreateIndexRequest and Builder #2460

Merged
merged 2 commits into from
Mar 15, 2022

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Mar 14, 2022

Removes the obsolete types based .addMapping method from CreateIndexRequest and
CreateIndexRequestBuilder. Tests are refactored to use the new source only
setMapping method.

relates #1940
depends on #2469

@nknize nknize added v2.0.0 Version 2.0.0 >breaking Identifies a breaking change. Indexing & Search labels Mar 14, 2022
@nknize nknize requested a review from a team as a code owner March 14, 2022 17:31
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure ec2b916eea8f52746b2d1b41efd5baf0922bef18
Log 3349

Reports 3349

@dreamer-89
Copy link
Member

dreamer-89 commented Mar 15, 2022

  1. testReindexTask
REPRODUCE WITH: ./gradlew ':client:rest-high-level:asyncIntegTest' --tests "org.opensearch.client.ReindexIT.testReindexTask" -Dtests.seed=BC6F51DDE4CE170E -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ar-SA -Dtests.timezone=America/St_Johns -Druntime.java=17

org.opensearch.client.ReindexIT > testReindexTask FAILED
    org.opensearch.client.ResponseException: method [GET], host [http://[::1]:44979], URI [/_tasks/2vU32eVGTlWKuA6HQfLvJw:8140], status line [HTTP/1.1 404 Not Found]
    {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [.tasks]","index":".tasks","resource.id":".tasks","resource.type":"index_expression","index_uuid":"_na_"}],"type":"resource_not_found_exception","reason":"task [2vU32eVGTlWKuA6HQfLvJw:8140] isn't running and hasn't stored its results","caused_by":{"type":"index_not_found_exception","reason":"no such index [.tasks]","index":".tasks","resource.id":".tasks","resource.type":"index_expression","index_uuid":"_na_"}},"status":404}
        at __randomizedtesting.SeedInfo.seed([BC6F51DDE4CE170E:24C55CD2D25BFD92]:0)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:350)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:295)
        at app//org.opensearch.client.OpenSearchRestHighLevelClientTestCase.lambda$checkTaskCompletionStatus$2(OpenSearchRestHighLevelClientTestCase.java:360)
        at app//org.opensearch.test.OpenSearchTestCase.assertBusy(OpenSearchTestCase.java:1048)
        at app//org.opensearch.test.OpenSearchTestCase.assertBusy(OpenSearchTestCase.java:1033)
        at app//org.opensearch.client.ReindexIT.testReindexTask(ReindexIT.java:155)

  1. testDeleteByQueryTask
REPRODUCE WITH: ./gradlew ':client:rest-high-level:asyncIntegTest' --tests "org.opensearch.client.ReindexIT.testDeleteByQueryTask" -Dtests.seed=BC6F51DDE4CE170E -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ar-SA -Dtests.timezone=America/St_Johns -Druntime.java=17

org.opensearch.client.ReindexIT > testDeleteByQueryTask FAILED
    org.opensearch.client.ResponseException: method [GET], host [http://[::1]:44979], URI [/_tasks/2vU32eVGTlWKuA6HQfLvJw:8072], status line [HTTP/1.1 404 Not Found]
    {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [.tasks]","index":".tasks","resource.id":".tasks","resource.type":"index_expression","index_uuid":"_na_"}],"type":"resource_not_found_exception","reason":"task [2vU32eVGTlWKuA6HQfLvJw:8072] isn't running and hasn't stored its results","caused_by":{"type":"index_not_found_exception","reason":"no such index [.tasks]","index":".tasks","resource.id":".tasks","resource.type":"index_expression","index_uuid":"_na_"}},"status":404}
        at __randomizedtesting.SeedInfo.seed([BC6F51DDE4CE170E:71BE98C7A063A131]:0)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:350)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:295)
        at app//org.opensearch.client.OpenSearchRestHighLevelClientTestCase.lambda$checkTaskCompletionStatus$2(OpenSearchRestHighLevelClientTestCase.java:360)
        at app//org.opensearch.test.OpenSearchTestCase.assertBusy(OpenSearchTestCase.java:1048)
        at app//org.opensearch.test.OpenSearchTestCase.assertBusy(OpenSearchTestCase.java:1033)
        at app//org.opensearch.client.ReindexIT.testDeleteByQueryTask(ReindexIT.java:331)
  1. Yaml related test failures. Most of them failing due to null value for response.total field.
java.lang.AssertionError: Failure at [reindex/80_slices:116]: field [response.total] is null

@nknize
Copy link
Collaborator Author

nknize commented Mar 15, 2022

no such index [.tasks]

This will be fixed by #2469

…ilder

Removes the obsolete types based .addMapping method from CreateIndexRequest and
CreateIndexRequestBuilder. Tests are refactored to use the new source only
setMapping method.

Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: Nicholas Walter Knize <[email protected]>
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure fee8d2f
Log 3399

Reports 3399

@nknize
Copy link
Collaborator Author

nknize commented Mar 15, 2022

Unrelated, unreproducible failure; reported in #2472. Refiring.

@nknize
Copy link
Collaborator Author

nknize commented Mar 15, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success fee8d2f
Log 3404

Reports 3404

Copy link
Member

@dreamer-89 dreamer-89 left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

@nknize nknize merged commit b619a05 into opensearch-project:main Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking Identifies a breaking change. Indexing & Search v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants