Skip to content

Commit bf53218

Browse files
feat(snapshots): Add is_selective column to PreprodSnapshotMetrics
Adds a boolean field to track whether a snapshot build was produced by selective testing. Used to prevent selective builds from being selected as baselines for comparison. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0b1cd82 commit bf53218

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/sentry/preprod/migrations/0028_add_images_skipped_to_snapshot_comparison.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generated by Django 5.2.12 on 2026-04-14 21:31
22

33
import sentry.db.models.fields.bounded
4-
from django.db import migrations
4+
from django.db import migrations, models
55

66
from sentry.new_migrations.migrations import CheckedMigration
77

@@ -33,4 +33,9 @@ class Migration(CheckedMigration):
3333
default=0, db_default=0
3434
),
3535
),
36+
migrations.AddField(
37+
model_name="preprodsnapshotmetrics",
38+
name="is_selective",
39+
field=models.BooleanField(default=False, db_default=False),
40+
),
3641
]

src/sentry/preprod/snapshots/models.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ class PreprodSnapshotMetrics(DefaultFieldsModel):
2121
)
2222

2323
image_count = BoundedPositiveIntegerField(default=0)
24-
25-
# Other future fields like carry forward references (selective testing),
26-
# history support, etc.
24+
is_selective = models.BooleanField(default=False, db_default=False)
2725

2826
# Miscellaneous fields that we don't need columns for, e.g. enqueue/dequeue times, user-agent, etc.
2927
extras = models.JSONField(null=True)

0 commit comments

Comments
 (0)