-
Notifications
You must be signed in to change notification settings - Fork 51
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
Retry new or modified tests based on git diff #102
Conversation
d6ecb3b
to
0823eaa
Compare
The best time to resolve flaky test is once you wrote that test. This is how Google looks for flakes in their monorepo. At that moment you have the best knowledge to solve such tests. Otherwise after month of running such test the cognitive load to fix it is very high. This PR adds a way to discover all changed test classes with diff to master branch and retry them until the maxRetry or to the first fail execution. Signed-off-by: Michał Rowicki <[email protected]>
0823eaa
to
7f1c5ff
Compare
Hi @wyhasany, thanks for the great contribution. I don't think this plugin is the right place to embed this functionality. It would be a better separation of concerns to have a separate plugin that adds the functionality you are adding here, and have it collaborate with this plugin. That's at least theoretically possible by having your plugin populate the filter.includedClasses of the extension, based on your inspection of the history. |
Hi @ldaley thanks for your feedback. Yes that's possible to populate The idea of that PR comes from this Google presentation: Could you elaborate with more details what is another way to implement proposed PR? I'm open for ideas 👍 |
@wyhasany I originally missed that this was based retry-until-fail, not retry-until-success. In that case, let's add that functionality generically. Then a separate, Git specific, plugin can build on that. There are a few things to sort out:
Probably more too, but let's start with that. |
Coming from opensearch-project/OpenSearch#5226 this is a great idea! |
@wyhasany , we have recently discussed internally the future of retry-until-success feature in this plugin, which is commonly requested. We decided to keep the plugin focused on retrying failures, and recommend using test framework features to achieve a similar behaviour (e.g., Spock's Retrying based on git diff sounds like a great idea, but as Luke suggested, it might make sense to add it as a separate plugin. I'll close this PR for now, but feel free to open an issue if there is anything we can assist with (for example, provide an integration point for the diff-based retries). |
The best time to resolve flaky test is once you wrote that test. This is
how Google looks for flakes in their monorepo. At that moment you have
the best knowledge to solve such tests. Otherwise after month of running
such test the cognitive load to fix it is very high.
This PR adds a way to discover all changed test classes with diff to
master branch and retry them until the
maxRetry
or to the first failexecution.
Unfortunately it breaks configuration cache support. Could you help me
to solve that issue?