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

[Backport 2.0] [Remove] Type from nested fields using new metadata field mapper #3097

Merged
merged 3 commits into from
Apr 27, 2022

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Apr 27, 2022

Backport 6b641d2 from #3004

…nsearch-project#3004)

* [Remove] Type from nested fields using new metadata field mapper

types support is removed yet nested documents use the _type field to store the
path for nested documents. A new _nested_path metadata field mapper is added to
take the place of the _type field in order to remove the type dependency in
nested documents. BWC is handled in the new field mapper to ensure compatibility
with older versions.

Signed-off-by: Nicholas Walter Knize <[email protected]>
@nknize nknize added v2.0.0 Version 2.0.0 backport PRs or issues specific to backporting features or enhancments Indexing & Search labels Apr 27, 2022
@nknize nknize requested a review from a team as a code owner April 27, 2022 16:50
@nknize
Copy link
Collaborator Author

nknize commented Apr 27, 2022

Note: let's not merge until 2.0 RC is built.

@nknize nknize changed the title [Backport 2.x] [Remove] Type from nested fields using new metadata field mapper [Backport 2.0] [Remove] Type from nested fields using new metadata field mapper Apr 27, 2022
@dreamer-89
Copy link
Member

This is failing on spotless java check task due to one unused import.

Execution failed for task ':server:spotlessJavaCheck'.
> The following files had format violations:
      src/test/java/org/opensearch/indices/IndicesModuleTests.java
          @@ -41,7 +41,6 @@
           import·org.opensearch.index.mapper.Mapper;
           import·org.opensearch.index.mapper.MapperParsingException;
           import·org.opensearch.index.mapper.MetadataFieldMapper;
          -import·org.opensearch.index.mapper.NestedPathFieldMapper;
           import·org.opensearch.index.mapper.RoutingFieldMapper;
           import·org.opensearch.index.mapper.SeqNoFieldMapper;
           import·org.opensearch.index.mapper.SourceFieldMapper;
  Run './gradlew :server:spotlessApply' to fix these violations.

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

❌   Gradle Check failure 8794cce
Log 4838

Reports 4838

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 578a26d
Log 4839

Reports 4839

@dreamer-89
Copy link
Member

dreamer-89 commented Apr 27, 2022

Lastest job run failed on task :buildSrc:pluginUnderTestMetadata. Doesn't look related to code change, probably transient one. Refiring.

> Task :distribution:bwc:minor:buildBwcLinuxTar
 [1.4.0] 
 [1.4.0] > Task :buildSrc:compileGroovy
 [1.4.0] Note: /var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/distribution/bwc/minor/build/bwc/checkout-1.x/buildSrc/src/main/groovy/org/opensearch/gradle/test/TestWithSslPlugin.java uses unchecked or unsafe operations.
 [1.4.0] Note: Recompile with -Xlint:unchecked for details.
 [1.4.0] WARNING: An illegal reflective access operation has occurred
 [1.4.0] WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/home/ubuntu/.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1/lib/groovy-all-1.3-2.5.12.jar) to method java.util.AbstractCollection.hugeCapacity(int)
 [1.4.0] WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
 [1.4.0] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
 [1.4.0] WARNING: All illegal access operations will be denied in a future release
 [1.4.0] 
 [1.4.0] > Task :buildSrc:generateVersionProperties
 [1.4.0] > Task :buildSrc:pluginDescriptors
 [1.4.0] > Task :buildSrc:processResources
 [1.4.0] > Task :buildSrc:classes
 [1.4.0] > Task :buildSrc:jar
 [1.4.0] > Task :buildSrc:assemble
 [1.4.0] > Task :buildSrc:pluginUnderTestMetadata FAILED
 [1.4.0] 
 [1.4.0] FAILURE: Build failed with an exception.
 [1.4.0] 
 [1.4.0] * What went wrong:
 [1.4.0] Execution failed for task ':buildSrc:pluginUnderTestMetadata'.
 [1.4.0] > Could not resolve all files for configuration ':buildSrc:runtimeClasspath'.
 [1.4.0]    > Could not find nebula-core-3.0.0.jar (com.netflix.nebula:nebula-core:3.0.0).
 [1.4.0]      Searched in the following locations:
 [1.4.0]          https://plugins.gradle.org/m2/com/netflix/nebula/nebula-core/3.0.0/nebula-core-3.0.0.jar
 [1.4.0] 
 [1.4.0] * Try:
 [1.4.0] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 [1.4.0] 
 [1.4.0] * Get more help at https://help.gradle.org
 [1.4.0] 
 [1.4.0] BUILD FAILED in 1m 34s

@dreamer-89
Copy link
Member

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 578a26d
Log 4840

Reports 4840

@nknize
Copy link
Collaborator Author

nknize commented Apr 27, 2022

Related to merge conflict:

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.IndicesModuleTests.testBuiltinMappers" -Dtests.seed=9AE7B29E887AF323 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=es-BO -Dtests.timezone=Asia/Hong_Kong -Druntime.java=17

org.opensearch.indices.IndicesModuleTests > testBuiltinMappers FAILED
    java.lang.AssertionError: expected:<10> but was:<11>
        at __randomizedtesting.SeedInfo.seed([9AE7B29E887AF323:287AF3F9128E5A44]:0)
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)
        at org.junit.Assert.assertEquals(Assert.java:647)
        at org.junit.Assert.assertEquals(Assert.java:633)
        at org.opensearch.indices.IndicesModuleTests.testBuiltinMappers(IndicesModuleTests.java:111)

I'll fix shortly.

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 6b39739
Log 4841

Reports 4841

@dblock dblock merged commit 96802e5 into opensearch-project:2.0 Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments Indexing & Search v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants