Skip to content

[AUTOCUT] Gradle Check Flaky Test Report for MetricAggregatorTests #18110

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

Closed
opensearch-ci-bot opened this issue Apr 28, 2025 · 7 comments · Fixed by #18331
Closed

[AUTOCUT] Gradle Check Flaky Test Report for MetricAggregatorTests #18110

opensearch-ci-bot opened this issue Apr 28, 2025 · 7 comments · Fixed by #18331
Assignees
Labels
autocut disabled-test Issues that are used by an AwaitsFix annotation to temporarily disable a broken test flaky-test Random test failure that succeeds on second run Search:Aggregations >test-failure Test failure from CI, local build, etc.

Comments

@opensearch-ci-bot
Copy link
Collaborator

opensearch-ci-bot commented Apr 28, 2025

Flaky Test Report for MetricAggregatorTests

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

Details

Git Reference Merged Pull Request Build Details Test Name
16e9fed 18221 57830 org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues
18c64db 18112 57314 org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues
1b48dbd 18090 57280 org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues
92b90fa 18220 58259 org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues

The other pull requests, besides those involved in post-merge actions, that contain failing tests with the MetricAggregatorTests 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. autocut flaky-test Random test failure that succeeds on second run untriaged labels Apr 28, 2025
@andrross
Copy link
Member

This is easily reproducible:

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues" -Dtests.seed=9F7B34E51FC4BB95 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=en-DK -Dtests.timezone=America/Kentucky/Louisville -Druntime.java=21

MetricAggregatorTests > testStarTreeDocValues FAILED
    java.lang.AssertionError: expected:<16.0> but was:<265.0>
        at __randomizedtesting.SeedInfo.seed([9F7B34E51FC4BB95:29A33C629A7BAF56]:0)
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at org.junit.Assert.assertEquals(Assert.java:685)
        at org.opensearch.search.aggregations.startree.MetricAggregatorTests.lambda$verifyAggregation$15(MetricAggregatorTests.java:430)
        at org.opensearch.search.aggregations.startree.MetricAggregatorTests.testCase(MetricAggregatorTests.java:492)
        at org.opensearch.search.aggregations.startree.MetricAggregatorTests.testCase(MetricAggregatorTests.java:446)
        at org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValuesInternal(MetricAggregatorTests.java:267)
        at org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues(MetricAggregatorTests.java:163)

@andrross andrross mentioned this issue Apr 29, 2025
1 task
@andrross
Copy link
Member

FYI @expani @sandeshkr419

@andrross andrross added disabled-test Issues that are used by an AwaitsFix annotation to temporarily disable a broken test Search:Aggregations and removed untriaged labels Apr 29, 2025
@mch2 mch2 assigned sandeshkr419 and unassigned sandeshkr419 May 7, 2025
@ajleong623
Copy link
Contributor

I can look into this.

@ajleong623
Copy link
Contributor

@andrross I ran ./gradlew ':server:test' --tests "org.opensearch.search.aggregations.startree.MetricAggregatorTests.testStarTreeDocValues" -Dtests.seed=9F7B34E51FC4BB95 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=en-DK -Dtests.timezone=America/Kentucky/Louisville -Druntime.java=21 in my OpenSearch repository, but I did not end up having an error.

Were you able to reproduce it on your end? I notice that the distribution my computer uses is different since the Linux distribution is used in the build where the test failed.

Is there any documentation on the possible "-Dtests" configurations I can use, or how I can run the tests on a linux distribution?

@andrross
Copy link
Member

andrross commented May 7, 2025

@ajleong623 Yeah I can reproduce it with that seed. Did you remove the AwaitsFix tag on the test that disables it?

@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/18110")

@ajleong623
Copy link
Contributor

@andrross I see what happened. I was running it in an outdated repository originally before the issue showed up, but I just cloned a new repository, and I removed the tag then ran the test. It was reproduced. Thank you so much for the suggestion.

@ajleong623
Copy link
Contributor

Just as a quick update, I am still working on this. At the moment, I noticed that the should boolean query is where the error is happening, so maybe that filter is not being applied in the star tree filter. I am diving into how the star tree index processes the documents and trying to see why more docs are being returned. I hope to have the pr out by the end of this week. This is one of the few issues I am working on currently.

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Search Project Board May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocut disabled-test Issues that are used by an AwaitsFix annotation to temporarily disable a broken test flaky-test Random test failure that succeeds on second run Search:Aggregations >test-failure Test failure from CI, local build, etc.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants