Skip to content

[AUTOCUT] Gradle Check Flaky Test Report for KeywordTermsAggregatorTests #18225

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

Open
opensearch-ci-bot opened this issue May 7, 2025 · 3 comments
Assignees
Labels
autocut flaky-test Random test failure that succeeds on second run Search Search query, autocomplete ...etc >test-failure Test failure from CI, local build, etc.

Comments

@opensearch-ci-bot
Copy link
Collaborator

opensearch-ci-bot commented May 7, 2025

Flaky Test Report for KeywordTermsAggregatorTests

Noticed the KeywordTermsAggregatorTests has some flaky, failing tests that failed during post-merge actions.

Details

Git Reference Merged Pull Request Build Details Test Name
bf8cd25 18103 57786 org.opensearch.search.aggregations.startree.KeywordTermsAggregatorTests.testStarTreeKeywordTerms

The other pull requests, besides those involved in post-merge actions, that contain failing tests with the KeywordTermsAggregatorTests class are:

For more details on the failed tests refer to OpenSearch Gradle Check Metrics dashboard.

@opensearch-ci-bot opensearch-ci-bot added >test-failure Test failure from CI, local build, etc. untriaged flaky-test Random test failure that succeeds on second run autocut labels May 7, 2025
@andrross andrross added the Search Search query, autocomplete ...etc label May 16, 2025
@andrross
Copy link
Member

FYI @sandeshkr419

@andrross
Copy link
Member

This is reproducible:

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.search.aggregations.startree.KeywordTermsAggregatorTests.testStarTreeKeywordTerms" -Dtests.seed=DAC644BCC974366C -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=cgg-Latn-UG -Dtests.timezone=Asia/Thimphu -Druntime.java=21

KeywordTermsAggregatorTests > testStarTreeKeywordTerms FAILED
    java.lang.AssertionError: expected:<0> but was:<6>
        at __randomizedtesting.SeedInfo.seed([DAC644BCC974366C:E37AAA48F3F907FB]: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.search.aggregations.AggregatorTestCase.searchAndReduceStarTree(AggregatorTestCase.java:810)
        at org.opensearch.search.aggregations.startree.KeywordTermsAggregatorTests.testCase(KeywordTermsAggregatorTests.java:207)
        at org.opensearch.search.aggregations.startree.KeywordTermsAggregatorTests.testStarTreeKeywordTerms(KeywordTermsAggregatorTests.java:160)

@sandeshkr419 sandeshkr419 self-assigned this May 21, 2025
@sandeshkr419
Copy link
Contributor

sandeshkr419 commented May 28, 2025

Did a bit of dive-deep on it, couldn't get to the exact reason yet.

So basically this is happening when multiple segments are present for the index and for some cases the decision to use star-tree is false (meaning it is reverting to the default flow).

Next step can be to isolate the case for a segment when the existing conditions are not suffice to force it to use star-tree.

I don't want to just force the segment count to 1 to fix the test before knowing the exact reason why star-tree is (or cannot) be used.


Basically I forced merge segment count to 1 to get the test passing to come up with the above hypothesis.

expected:<0> but was:<6>

The assertion is on the number of docValues visited - collect() invoked which should be 0 for star-tree case as doc-values need not be visited once the result is pre-computed.

The final aggregation result (buckets) is however correct - checked from the final bucket comparison assertions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocut flaky-test Random test failure that succeeds on second run Search Search query, autocomplete ...etc >test-failure Test failure from CI, local build, etc.
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants