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 Flaky Test #13678

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

kiranprakash154
Copy link
Contributor

@kiranprakash154 kiranprakash154 commented May 15, 2024

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

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • API changes companion pull request created.
  • 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.

@github-actions github-actions bot added bug Something isn't working Search Search query, autocomplete ...etc labels May 15, 2024
Copy link
Contributor

❌ Gradle check result for cd2d840: 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
Copy link
Member

dblock commented May 15, 2024

@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
Copy link
Contributor Author

@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
Copy link
Contributor Author

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.

@kiranprakash154 kiranprakash154 self-assigned this May 15, 2024
Copy link
Contributor

❌ 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?

@kiranprakash154
Copy link
Contributor Author

kiranprakash154 commented May 16, 2024

❌ 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 #5329 - testTaskResourceTrackingDuringTaskCancellation

Copy link
Contributor

❌ 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?

@kiranprakash154
Copy link
Contributor Author

❌ 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 - #7396

@dblock
Copy link
Member

dblock commented May 17, 2024

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?

Copy link
Contributor

❌ 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?

@dblock
Copy link
Member

dblock commented May 17, 2024

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?

Signed-off-by: Kiran Prakash <awskiran@amazon.com>
@kiranprakash154
Copy link
Contributor Author

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

Copy link
Contributor

❌ 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?

Copy link
Contributor

✅ Gradle check result for 5b05f4f: SUCCESS

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@             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     

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

@kiranprakash154
Copy link
Contributor Author

kiranprakash154 commented May 17, 2024

❌ 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 - #13734

Copy link
Contributor

❌ 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?

Copy link
Contributor

❌ 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?

@kiranprakash154
Copy link
Contributor Author

kiranprakash154 commented May 20, 2024

❌ 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 - #13695

Copy link
Contributor

✅ Gradle check result for a5c83ae: SUCCESS

@kiranprakash154 kiranprakash154 added the backport 2.x Backport to 2.x branch label May 20, 2024
@dblock dblock merged commit 538cd9f into opensearch-project:main May 20, 2024
31 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 20, 2024
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
(cherry picked from commit 538cd9f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dblock pushed a commit that referenced this pull request May 20, 2024
(cherry picked from commit 538cd9f)

Signed-off-by: Kiran Prakash <awskiran@amazon.com>
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 Search Search query, autocomplete ...etc skip-changelog
Projects
None yet
2 participants