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

[#6187, #6222] Fixing the GeoShapes GeoHash and GeoTile Aggregations Integration tests to make them more robust. #6242

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

navneet1v
Copy link
Contributor

@navneet1v navneet1v commented Feb 8, 2023

Description

Fixing the GeoShapes GeoHash and GeoTile Aggregations Integration tests to make them more robust.

Signed-off-by: Navneet Verma navneev@amazon.com

The issue was happening few random seeds. For GeoHash aggregations on shape we are getting ArrayIndexOut of bounds exception because we were not resetting the values of SortedNumericDocs leading to access of memory area not initialized by the vectors.

Changes done:

  • Fixed the ArrayIndexOutOfBoundsException.
  • Reduced the precision for GeoShapes Aggregation IT testing.

For improving the testing for bounded geoshape aggregation I am creating a new Github issue. #6251

Issues Resolved

#6187, #6222

Testing

Done using the failed gradle flows in the issues.

(base) 12:03 /Volumes/workplace/OpenSearch main$ ./gradlew ':modules:geo:internalClusterTest' --tests "org.opensearch.geo.search.aggregations.bucket.GeoHashGridIT.testGeoShapes" -Dtests.seed=58EEE2632DEE6DD -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ar-OM -Dtests.timezone=Europe/Madrid
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true

> Configure project :qa:os
Cannot add task 'destructiveDistroTest.docker' as a task with that name already exists.
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.6
  OS Info               : Mac OS X 12.6.3 (x86_64)
  JDK Version           : 11 (Eclipse Temurin JDK)
  JAVA_HOME             : /Users/navneev/.sdkman/candidates/java/11.0.16-tem
  Random Testing Seed   : 58EEE2632DEE6DD
  In FIPS 140 mode      : false
=======================================

> Task :libs:opensearch-x-content:compileJava
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :server:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :modules:geo:compileJava
Note: /Volumes/workplace/OpenSearch/modules/geo/src/main/java/org/opensearch/geo/GeoModulePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :test:framework:compileJava
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :modules:geo:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :modules:geo:compileInternalClusterTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :modules:geo:internalClusterTest
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/Volumes/workplace/OpenSearch/test/framework/build/distributions/framework-3.0.0-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/Users/navneev/.gradle/wrapper/dists/gradle-7.6-all/9f832ih6bniajn45pbmqhk2cw/gradle-7.6/lib/plugins/gradle-testing-base-7.6.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

BUILD SUCCESSFUL in 3m 21s
48 actionable tasks: 10 executed, 38 up-to-date
<-------------> 0% WAITING
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
> IDLE
(base) 12:18 /Volumes/workplace/OpenSearch main$ ./gradlew ':modules:geo:internalClusterTest' --tests "org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes" -Dtests.seed=EC3F504EF22998E0
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true

> Configure project :qa:os
Cannot add task 'destructiveDistroTest.docker' as a task with that name already exists.
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.6
  OS Info               : Mac OS X 12.6.3 (x86_64)
  JDK Version           : 11 (Eclipse Temurin JDK)
  JAVA_HOME             : /Users/navneev/.sdkman/candidates/java/11.0.16-tem
  Random Testing Seed   : EC3F504EF22998E0
  In FIPS 140 mode      : false
=======================================

> Task :modules:geo:internalClusterTest
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/Volumes/workplace/OpenSearch/test/framework/build/distributions/framework-3.0.0-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/Users/navneev/.gradle/wrapper/dists/gradle-7.6-all/9f832ih6bniajn45pbmqhk2cw/gradle-7.6/lib/plugins/gradle-testing-base-7.6.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

BUILD SUCCESSFUL in 17s
48 actionable tasks: 1 executed, 47 up-to-date

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@navneet1v
Copy link
Contributor Author

@nknize @andrross can you please take a look at this PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@navneet1v
Copy link
Contributor Author

Gradle Check (Jenkins) Run Completed with:

Fixing these tests.

…es GeoHash and GeoTile Aggregations Integration tests.

Changes done:
* Fixed the ArrayIndexOutOfBoundsException.
* Reduced the precision for GeoShapes Aggregation IT testing.

Signed-off-by: Navneet Verma <navneev@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

Gradle Check (Jenkins) Run Completed with:

@navneet1v navneet1v requested a review from nknize February 9, 2023 21:56
Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

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

LGTM! Thx!

@nknize nknize merged commit 9386cde into opensearch-project:main Feb 10, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-6242-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9386cde55a55d8b4779a0c58ba9a6240d04cbe2c
# Push it to GitHub
git push --set-upstream origin backport/backport-6242-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-6242-to-2.x.

heemin32 pushed a commit to heemin32/OpenSearch that referenced this pull request Jun 28, 2023
…es GeoHash and GeoTile Aggregations Integration tests. (opensearch-project#6242)

Changes done:
* Fixed the ArrayIndexOutOfBoundsException.
* Reduced the precision for GeoShapes Aggregation IT testing.

Signed-off-by: Navneet Verma <navneev@amazon.com>
andrross pushed a commit that referenced this pull request Jun 30, 2023
* Add GeoTile and GeoHash Grid aggregations on GeoShapes. (#5589)

Src files for GeoTile and GeoHash Aggregations on GeoShape with integration
tests.

Signed-off-by: Navneet Verma <navneev@amazon.com>

* [opensearch-project/geospatial#212] Fixing the IT for GeoTilesAggrega… (#6120)

Fixing the IT for GeoTilesAggregation.

Signed-off-by: Navneet Verma <navneev@amazon.com>

* [#6187, #6222] Fixing the GeoShapes GeoHash and GeoTile Aggregations Integration tests. (#6242)

Changes done:
* Fixed the ArrayIndexOutOfBoundsException.
* Reduced the precision for GeoShapes Aggregation IT testing.

Signed-off-by: Navneet Verma <navneev@amazon.com>

* [#7101] Fixing the GeoTileIT#testMultivaluedGeoPointsAggregation test case. (#7166)

The issue was happening because we encode the GeoPoint as long and error comes in the precision due to that encoding. The error was not taken care while generating the exepected tiles count for execpected output.

Signed-off-by: Navneet Verma <navneev@amazon.com>

---------

Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Heemin Kim <heemin@amazon.com>
Co-authored-by: Navneet Verma <navneev@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants