-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fixing flaky test GeoPointShapeQueryTests.testQueryLinearRing #12783
Fixing flaky test GeoPointShapeQueryTests.testQueryLinearRing #12783
Conversation
Signed-off-by: Shweta Thareja <[email protected]>
@peternied to help with review. |
Compatibility status:Checks if related components are compatible with change e2276ac Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git] |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12783 +/- ##
============================================
+ Coverage 71.42% 71.44% +0.02%
- Complexity 59978 60128 +150
============================================
Files 4985 4999 +14
Lines 282275 283041 +766
Branches 40946 41027 +81
============================================
+ Hits 201603 202221 +618
- Misses 63999 64030 +31
- Partials 16673 16790 +117 ☔ View full report in Codecov by Sentry. |
tagging @andrross / @rishabhmaurya as well |
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.
LGTM. Assuming that the test expects serialisation failure to be a valid test case and doesn't expect the test to fail
Thanks @Bukhtawar for the review. |
ad6b538
into
opensearch-project:main
Signed-off-by: Shweta Thareja <[email protected]> Co-authored-by: Shweta Thareja <[email protected]> (cherry picked from commit ad6b538) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
#12784) (cherry picked from commit ad6b538) Signed-off-by: Shweta Thareja <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Shweta Thareja <[email protected]>
@shwetathareja Thanks for this improvement! |
@shwetathareja Can you explain in what scenario we get "line ring cannot be serialized using GeoJson"? I read both the issue and this PR and I don't understand the conditions in which it's ok, and why we should be relying on an exception, and a broad one like |
@dblock It is a negative test. It expects the exception that serialization fail for Line ring and today for GeoJson, serialization of line ring is not supported. Below is the existing catch and assertion in the test, we don't support Line ring as we can't serialize it. This is more readable message and wrapped under SearchPhaseExecutionException. But the inner cause for the same is
we are not ignoring failure, it is asserting on exception message, if it fails for any other reason than serialization error, it will result in assertion failure. |
@shwetathareja The OpenSearch uses exception hierarchy to catch (and wrap) exceptions that happens during search into one of |
Consistent repro with |
@reta : I don't think we wrap all sort of exceptions like IllegalArgumentException etc. are just thrown as is. |
@shwetathareja I am specifically referring to search flow in the comment |
I think the fact that an UnsupportedOperationException is thrown when TRACE logging is enabled is a bug, and a serialization failure is not expected behavior when writing a log statement. Users will face the same pain that we see with tests if they enable TRACE logging in a running system (see #12324) |
…arch-project#12783) Signed-off-by: Shweta Thareja <[email protected]> Co-authored-by: Shweta Thareja <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
It fixes the GeoPointShapeQueryTests.testQueryLinearRing which has been failing across multiple PR during gradle-check
Related Issues
Resolves 11688
Check List
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.