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

[ci] Test retries don't clean between runs #8687

Open
jpobst opened this issue Jan 29, 2024 · 1 comment
Open

[ci] Test retries don't clean between runs #8687

jpobst opened this issue Jan 29, 2024 · 1 comment
Assignees
Labels
Area: Unit Tests Issues with repo unit tests. bug Component does not function as intended.
Milestone

Comments

@jpobst
Copy link
Contributor

jpobst commented Jan 29, 2024

For the tests that use Azure Pipelines' built-in retryCountOnTaskFailure (like Mono.Android.NET-Tests), the test suite is re-run immediately after the failure. We cannot inject any extra steps before the retry. This means that the second run is an incremental build because the obj/bin directories are not cleaned. Additionally, the logs from the first run are not captured.

This could lead to passing of tests that fail on initial builds and only succeed on incremental builds.

Given the inflexibility of retryCountOnTaskFailure, we likely need to turn it off completely.

We should also examine our usage of dotnet-test-slicer to see if it suffers from the same issue. At least with dotnet-test-slicer we can run steps between the initial run and the retry, so we can add manual cleans if needed.

@jpobst jpobst added the Area: Unit Tests Issues with repo unit tests. label Jan 29, 2024
@jpobst jpobst self-assigned this Jan 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issues that need to be assigned. label Jan 29, 2024
@jpobst jpobst changed the title Test retries don't clean between runs [ci] Test retries don't clean between runs Jan 29, 2024
@jpobst jpobst removed the needs-triage Issues that need to be assigned. label Jan 29, 2024
@jpobst jpobst added this to the .NET 9 milestone Feb 9, 2024
@jpobst jpobst added the bug Component does not function as intended. label Feb 9, 2024
jpobst added a commit that referenced this issue Mar 14, 2024
Context: #8687

In #7963, we added an automatic retry mechanism to the APK test suites.  However this mechanism does not give us a chance to run any tasks between the retry.  

This means that when the tests are run a second time the output directories have not been cleaned and thus we are running incremental builds instead of full builds.  We could unknowingly have tests that always fail on a clean build and succeed on an incremental build.

Thus we are going to remove the automatic retries.  The good news is these test suites seem to be much more stable now than when we implemented the retries, so hopefully this will not result in too many flaky CI builds.
@jpobst
Copy link
Contributor Author

jpobst commented Apr 23, 2024

This was fixed for the APK test suites in #8811.

Still need to verify the dotnet-test-slicer test suites.

jonathanpeppers pushed a commit that referenced this issue May 8, 2024
Context: #8687

In #7963, we added an automatic retry mechanism to the APK test suites.  However this mechanism does not give us a chance to run any tasks between the retry.  

This means that when the tests are run a second time the output directories have not been cleaned and thus we are running incremental builds instead of full builds.  We could unknowingly have tests that always fail on a clean build and succeed on an incremental build.

Thus we are going to remove the automatic retries.  The good news is these test suites seem to be much more stable now than when we implemented the retries, so hopefully this will not result in too many flaky CI builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Unit Tests Issues with repo unit tests. bug Component does not function as intended.
Projects
None yet
Development

No branches or pull requests

1 participant