-
Notifications
You must be signed in to change notification settings - Fork 10k
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
"Flaky" attribute for tests that are flaky in various environments #8237
Comments
Some useful notes (for my own reference): |
One thing to think about is how this attribute affects dev builds. My feeling is that it has no effect and we still run flaky tests on dev builds. That's the easiest pattern right now, but I'm open to discussion :). |
Hmm I suppose we could try that, but why bother? |
AzDO seems about as likely to have queue-specific flakiness as Helix, may as well allow it to be list the queue's it hates too. |
Can do! |
Mostly because of how the traits work. By default, VS doesn't apply any trait filters, nor does |
Ah OK |
Plus the goal here is clean CI builds. Right now, I'm not too worried if engineers who are running tests in the projects containing flakiness see flakiness :). It's likely their responsibility anyway 😈. |
Maybe this is getting too far ahead, but it seems like we also need some kind of automated good behavior/parole for falsely accused 'innocent' tests that might be jailed for things unrelated to them, i.e. will we be able to easily do something like parole any tests that haven't failed in a week/month? Seems important to have a reasonably lax parole system if its 1 strike and its off to flake island... |
Yeah, that's the kind of analysis we can do by scraping the TRX/xUnit reports from the flaky test runs. That's one major reason I want to keep running and reporting them :). |
This is done. |
Tracking work:
Usage examples:
[Flaky("...")]
- This test is always flaky[Flaky("...", OnHelixQueues = "none")]
- This test is flaky on AzDO but never on Helix[Flaky("...", OnAzDO = false)]
- This test is flaky on Helix but never on AzDO[Flaky("...", OnHelixQueues = "Debian8.whatchamajigger...;Ubuntu.CromulantCrux...")]
- This test is flaky on AzDO and specific Helix queues but never on the other Helix queues[Flaky("...", OnHelixQueues = "Debian8.whatchamajigger...;Ubuntu.CromulantCrux...", OnAzDO = false)]
- This test is only on specific helix queues and never flaky on the other queues and AzDOThe idea being that the attribute defines the environments in which the test is flaky and the tooling for those builds will sequester the test as necessary.
Discussions are open on making sure these properties are clear and understandable :). My goal was to say that by default
Flaky
indicates the entire test is flaky in all environments and then the other attributes can be used to "loosen" the requirements.The implementation is still somewhat TBD (I'll be playing with this today) but the idea is this:
flaky
xunit trait will be appliedflaky
traitflaky
trait which will ignore the exit code, but still record the results.This all depends on the infrastructure supporting what I want to do here, but I think we can get away with not having a separate
AspNetCore-flaky-ci
run :).I think this can live in https://github.com/aspnet/Extensions/tree/master/src/TestingUtils/Microsoft.AspNetCore.Testing and be accessible to everyone.. or we can use a shared-source file like we do with
SkipOnHelixAttribute
today.@Eilon @muratg @mkArtakMSFT @ajcvickers @HaoK @ryanbrandenburg @dougbu (maybe we need an
aspnet/engineering
GitHub team ;))The text was updated successfully, but these errors were encountered: