-
Notifications
You must be signed in to change notification settings - Fork 25
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
Mechanism to close the created Gradle Check AUTOCUT flaky test issues #448
Conversation
996725e
to
cc03731
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #448 +/- ##
============================================
- Coverage 87.12% 84.23% -2.90%
- Complexity 31 80 +49
============================================
Files 88 105 +17
Lines 233 520 +287
Branches 12 61 +49
============================================
+ Hits 203 438 +235
- Misses 22 26 +4
- Partials 8 56 +48 ☔ View full report in Codecov by Sentry. |
b7f8327
to
67890bd
Compare
The reason the |
Looks fine overall, didn't really get the comparison logic. |
Hey @rishabh6788 the logic assumes that the AUTOCUT issue created by the automation is fixed by the assigned owner, who then closes the issue. If the automation identifies a flaky test again (e.g., within the last 30 days and after the fix), and the issue is closed, the automation will compare the issue body table for all tests against the actual test results from the cluster query. If they match, the issue remains closed. However, if the query results differ (e.g., different post-merge commit or test results), the automation will reopen the issue and update the issue body with the new failing test data and linking the pull requests. The automation wont compare the open/closed status of past or present pull requests, once the issue is fixed and the pull requests are re-based, the flaky error should no longer be present. If the flaky error persists, the user can reopen the issue, and the automation will continue to update the issue body and link back the pull requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this will need version bump?
Ya let me update the version Sayali. |
Signed-off-by: Prudhvi Godithi <[email protected]>
Thanks @gaiksaya and @rishabh6788 I will go ahead and merge this PR. |
9a7a323
into
opensearch-project:main
…#448) Signed-off-by: Prudhvi Godithi <[email protected]> (cherry picked from commit 9a7a323) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Updated the logic to query the cluster for flaky tests with user defined
timeFrame
rather that default to an monthly created index. This can be updated dynamically without the library release usingtimeFrame
arg.New library
gradleCheckFlakyTestGitHubIssue
to handle the issue creation, edit issue body and skip when issue is closed. This library is inspired fromcreateGithubIssue
but used only bygradleCheckFlakyTestDetector
with some additional logic used for only gradle check flaky issue creation automation.New groovy class
MarkdownComparator
to compare two markdown tables in the format created by classCreateMarkDownTable
. This uses the row part of the markdown table and identifies if there is any difference found between the data part of the OpenSearch metrics cluster and part of the created issue body. If there is no difference thegradleCheckFlakyTestGitHubIssue
wont re-open the issue closed by the user. If found difference thegradleCheckFlakyTestGitHubIssue
will re-open and update the issue body with the new data.New class
ParseMarkDownTable
is added to just parse the markdown tables in the format created by classCreateMarkDownTable
. TheParseMarkDownTable
is used for parsing the issue body and for the generated test report from data from Metrics cluster.Added
token: ${{ secrets.CODECOV_TOKEN }}
to fix the errorIssues Resolved
Part of opensearch-project/OpenSearch#14475
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.