opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
8.89k stars 1.63k forks source link

Fix Flaky Test #13678

Closed kiranprakash154 closed 1 week ago

kiranprakash154 commented 2 weeks ago

Description

Fix Flaky Test - org.opensearch.indices.IndicesRequestCacheIT.testInvalidStalenessThresholdUpdateThrowsException The test is intended to test an exception being thrown on invalid parameter being passed. We don't have to test the working of the cache in this test since it has been covered very extensive in other tests.

The flakiness is due to relying on cache cleanup intervals which are being removed from this test without changing the main objective of the test.

Related Issues

Resolves #13638

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.

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for cd2d840c68c2993c68c64f1d46067b9f42af2101: 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?

dblock commented 2 weeks ago

@kiranprakash154 Care to explain what the change is? Looks like a bunch of code that was removed from the test, so I assume it tests less ;)

kiranprakash154 commented 2 weeks ago

@kiranprakash154 Care to explain what the change is? Looks like a bunch of code that was removed from the test, so I assume it tests less ;)

Will update the description soon, that's why I kept this in draft.

kiranprakash154 commented 2 weeks ago

The test is supposed to only test throwing of an exception on illegal argument, I was also testing if the cache would behave as expected which I think is unnecessary and that cache interval setup is what causing flakiness.

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for 07c31a5df15be196405c88d4b9364eb53c3df7f2: 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?

kiranprakash154 commented 2 weeks ago

❌ Gradle check result for 07c31a5: 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?

Failed because of https://github.com/opensearch-project/OpenSearch/issues/5329 - testTaskResourceTrackingDuringTaskCancellation

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for 07c31a5df15be196405c88d4b9364eb53c3df7f2: 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?

kiranprakash154 commented 2 weeks ago

❌ Gradle check result for 07c31a5: 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?

Failing due to - :distribution:bwc:staged:buildBwcLinuxTar - https://github.com/opensearch-project/OpenSearch/issues/7396

dblock commented 2 weeks ago

The test is supposed to only test throwing of an exception on illegal argument, I was also testing if the cache would behave as expected which I think is unnecessary and that cache interval setup is what causing flakiness.

I assume you double checked that those scenarios are covered in another test?

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for 07c31a5df15be196405c88d4b9364eb53c3df7f2: 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?

dblock commented 2 weeks ago
Execution failed for task ':distribution:bwc:staged:buildBwcLinuxTar'.
> Building 2.14.0 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/staged/build/bwc/checkout-2.14/distribution/archives/linux-tar/build/distributions/opensearch-min-2.14.0-SNAPSHOT-linux-x64.tar.gz

Rebase this?

kiranprakash154 commented 2 weeks ago

The test is supposed to only test throwing of an exception on illegal argument, I was also testing if the cache would behave as expected which I think is unnecessary and that cache interval setup is what causing flakiness.

I assume you double checked that those scenarios are covered in another test?

Yep, like these 3 tests for example Some of the tests below them cover too

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for a5c83aeac88afc24e31041707fcff730a0f8309f: 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?

github-actions[bot] commented 2 weeks ago

:white_check_mark: Gradle check result for 5b05f4f2c5f134c311dc535339b2c959972673b5: SUCCESS

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.66%. Comparing base (b15cb0c) to head (a5c83ae). Report is 292 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #13678 +/- ## ============================================ + Coverage 71.42% 71.66% +0.24% - Complexity 59978 61286 +1308 ============================================ Files 4985 5060 +75 Lines 282275 287854 +5579 Branches 40946 41689 +743 ============================================ + Hits 201603 206286 +4683 - Misses 63999 64534 +535 - Partials 16673 17034 +361 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kiranprakash154 commented 2 weeks ago

❌ Gradle check result for a5c83ae: 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?

This is due to IndicesRequestCacheIT suite timing out. I have created an issue to track this - https://github.com/opensearch-project/OpenSearch/issues/13734

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for a5c83aeac88afc24e31041707fcff730a0f8309f: 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?

dblock commented 1 week ago

❌ Gradle check result for a5c83ae: 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?

org.opensearch.cluster.MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock org.opensearch.indices.IndicesRequestCacheIT.testDeleteAndCreateSameIndexShardOnSameNode {p0={"search.concurrent_segment_search.enabled":"true"}} org.opensearch.indices.IndicesRequestCacheIT.testDeleteAndCreateSameIndexShardOnSameNode {p0={"opensearch.experimental.feature.pluggable.caching.enabled":"true"}} org.opensearch.indices.IndicesRequestCacheIT.testDeleteAndCreateSameIndexShardOnSameNode {p0={"opensearch.experimental.feature.pluggable.caching.enabled":"false"}} org.opensearch.indices.IndicesRequestCacheIT.testDeleteAndCreateSameIndexShardOnSameNode {p0={"search.concurrent_segment_search.enabled":"false"}}

https://github.com/opensearch-project/OpenSearch/issues/10006 https://github.com/opensearch-project/OpenSearch/issues/13600

github-actions[bot] commented 1 week ago

:x: Gradle check result for a5c83aeac88afc24e31041707fcff730a0f8309f: 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?

kiranprakash154 commented 1 week ago

❌ Gradle check result for a5c83ae: 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?

Known flaky DefaultCacheStatsHolderTests.testConcurrentRemoval - https://github.com/opensearch-project/OpenSearch/issues/13695

github-actions[bot] commented 1 week ago

:white_check_mark: Gradle check result for a5c83aeac88afc24e31041707fcff730a0f8309f: SUCCESS