Skip to content

Commit

Permalink
Add the flaky_status field to the TestInstance model (#184)
Browse files Browse the repository at this point in the history
* feat: add error field to test results totals

* feat: add flaky status field to TestInstance model
  • Loading branch information
joseph-sentry authored Apr 17, 2024
1 parent aa85685 commit 0cfa718
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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),
),
]
8 changes: 7 additions & 1 deletion shared/django_apps/reports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 0cfa718

Please sign in to comment.