diff --git a/shared/django_apps/reports/migrations/0017_testinstance_flaky_status.py b/shared/django_apps/reports/migrations/0017_testinstance_flaky_status.py new file mode 100644 index 00000000..9e89627e --- /dev/null +++ b/shared/django_apps/reports/migrations/0017_testinstance_flaky_status.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-04-12 19:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reports', '0016_testresultreporttotals_error'), + ] + + operations = [ + migrations.AddField( + model_name='testinstance', + name='flaky_status', + field=models.CharField(choices=[('failed_in_default_branch', 'Failed In Default Branch'), ('consecutive_diff_outcomes', 'Consecutive Diff Outcomes'), ('unrelated_matching_failures', 'Unrelated Matching Failures')], max_length=100, null=True), + ), + ] diff --git a/shared/django_apps/reports/models.py b/shared/django_apps/reports/models.py index 9f46f35b..b3203050 100644 --- a/shared/django_apps/reports/models.py +++ b/shared/django_apps/reports/models.py @@ -282,6 +282,12 @@ class Outcome(models.TextChoices): ERROR = "error" PASS = "pass" + class FlakeSymptomType(models.TextChoices): + FAILED_IN_DEFAULT_BRANCH = "failed_in_default_branch" + CONSECUTIVE_DIFF_OUTCOMES = "consecutive_diff_outcomes" + UNRELATED_MATCHING_FAILURES = "unrelated_matching_failures" + + flaky_status = models.CharField(null=True, max_length=100, choices=FlakeSymptomType.choices) duration_seconds = models.FloatField() outcome = models.CharField(max_length=100, choices=Outcome.choices) upload = models.ForeignKey( @@ -302,7 +308,7 @@ class TestResultReportTotals(BaseCodecovModel): skipped = models.IntegerField() failed = models.IntegerField() - class TestResultsProcessingError(models.Choices): + class TestResultsProcessingError(models.TextChoices): NO_SUCCESS = "no_success" error = models.CharField(