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

Fix the flaky test for derived fields highlighter test #13313

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

rishabhmaurya
Copy link
Contributor

@rishabhmaurya rishabhmaurya commented Apr 19, 2024

Description

Fixes flaky test introduced in highlighter test for derived field.

Related Issues

Resolves #13249

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • [ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • [ ] Public documentation issue/PR created

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.

@rishabhmaurya
Copy link
Contributor Author

rishabhmaurya commented Apr 19, 2024

@mch2 Please review when you get a chance

@github-actions github-actions bot added bug Something isn't working flaky-test Random test failure that succeeds on second run Search Search query, autocomplete ...etc labels Apr 19, 2024
Copy link
Contributor

❌ Gradle check result for 013bed0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@mch2
Copy link
Member

mch2 commented Apr 21, 2024

thanks @rishabhmaurya. I took a quick look at the failing seeds and re-ran this a bunch and don't see failures. Looks like the fix is that we are now always using a StandardDirectoryReader when constructing ContextIndexSearcher instead of using the reader fetched from the searcher which can randomly wrap the reader in ParallelCompositeReader. Am curious if we could we fix this by passing false to newSearcher instead? newSearcher(reader, false); and if there is reason we don't want to do that.

@mch2
Copy link
Member

mch2 commented Apr 21, 2024

❌ Gradle check result for 013bed0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

#7791

Copy link
Contributor

❕ Gradle check result for 013bed0: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.40%. Comparing base (b15cb0c) to head (013bed0).
Report is 197 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13313      +/-   ##
============================================
- Coverage     71.42%   71.40%   -0.02%     
- Complexity    59978    60609     +631     
============================================
  Files          4985     5039      +54     
  Lines        282275   285432    +3157     
  Branches      40946    41337     +391     
============================================
+ Hits         201603   203808    +2205     
- Misses        63999    64796     +797     
- Partials      16673    16828     +155     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mch2 mch2 merged commit bfbdc9f into opensearch-project:main Apr 21, 2024
75 of 76 checks passed
@mch2 mch2 added the backport 2.x Backport to 2.x branch label Apr 21, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 21, 2024
Signed-off-by: Rishabh Maurya <[email protected]>
(cherry picked from commit bfbdc9f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@rishabhmaurya
Copy link
Contributor Author

@mch2 thanks for the review. I don't have a reason for not using newSearcher(reader, false);. I think this time I just copied it from other usage of searcher in unit tests and used in a similar fashion for consistency.

dblock pushed a commit that referenced this pull request Apr 22, 2024
(cherry picked from commit bfbdc9f)

Signed-off-by: Rishabh Maurya <[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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working flaky-test Random test failure that succeeds on second run Search Search query, autocomplete ...etc skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] DerivedFieldFetchAndHighlightTests has flaky tests
3 participants