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 flake finder for unit tests #16279
Conversation
this will allow us to have different matrix expansions for different use cases, will be used to add iterative expansion on infrequent schedule or on workflow dispatch with parameters to add statistical power to flake-hunting attempts
Each commit works by itself, I had to build this very very carefully since the merger of matrices + yaml + javascript + json is really touchy. So I went slowly and each commit was tested by itself for correct functionality - rebase merge will be fine |
Note: will require a settings change such that branch protections are now looking for the required status from the 3 runs but with "Unit Tests / " prepended to the check names Also has run count in there, so perhaps the branch protection can be a regex 🤔 - investigating Okay: investigated We will need to temporarily disable the specific status checks for unit tests while this goes in
That should work because we want to see at least 1 iteration of each, and that is the default set produced from a pull request event trigger on this workflow |
@krmanik just tagging you because you might be interested in this - you've done so much github workflow + |
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.
documentation-only. Code looks good
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.
Implementer's choice on all comment trees. Let's get this in
this should allow us to get statistical confidence that we can both reproduce flakes and say we have fixed them
5c016e3
to
23f1c24
Compare
I liked the suggestions - had just enough time for the docs polishes and re-pushed, re-tested on my branch, the default expansion was still as expected (all 3, 1 iteration) and a manual run of windows + 3 worked, both visible here https://github.com/mikehardy/Anki-Android/actions/workflows/tests_unit.yml |
I hate to merge this then ghost so I'm going to wait until I have time or someone else can commit to the branch protection temp disable / re-enable with new names I mention above with link to settings area #16279 (comment) |
The input can be provided similar to
We can use @actions/core to set output.
To access the value in same job,
To access the value in different job,
|
The toJSON I used but still need to parse the os array because it was still a string inside inputs The output was just using default return from the script so didn't need anything fancy theree |
Okay, I'm going to merge this now then do the required baby-sitting on branch protection rules |
New branch protection rules are in place. |
Purpose / Description
We had a hard time with windows unit test flake reproduction.
I threw in a crude hack on the workflow as a temporary commit that iterated over windows a lot of times, and that allowed for reproduction confidence
This is an attempt to make that a general feature - so you can select either all 3 operating systems we run or focus on one of them, and you can run an arbitrary number of iterations of unit tests on it (okay, 255 limit, but that's a lot)
Fixes
Approach
How Has This Been Tested?
On my separate fork: https://github.com/mikehardy/Anki-Android/actions/workflows/tests_unit.yml
Learning (optional, can help others)
Checklist
Please, go through these checks before submitting the PR.