Skip to content

Commit

Permalink
Implement chance culprit revision for backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
florinbilt committed Nov 19, 2024
1 parent bc097e6 commit e4cb1c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/webapp/api/test_performance_alertsummary_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def test_alert_summaries_get(
"related_alerts",
"repository",
"push_id",
"original_revision",
"status",
"revision",
"push_timestamp",
Expand Down Expand Up @@ -167,6 +168,7 @@ def test_alert_summaries_get_onhold(
"related_alerts",
"repository",
"push_id",
"original_revision",
"status",
"revision",
"push_timestamp",
Expand Down
7 changes: 5 additions & 2 deletions treeherder/webapp/api/performance_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,11 @@ class PerformanceAlertSummarySerializer(serializers.ModelSerializer):
)
repository = serializers.SlugRelatedField(read_only=True, slug_field="name")
framework = serializers.SlugRelatedField(read_only=True, slug_field="id")
revision = serializers.SlugRelatedField(read_only=False, slug_field="revision", source="push", required=False, queryset=Push.objects.all())
original_revision = serializers.SlugRelatedField(read_only=True, slug_field="revision", source="original_push")
revision = serializers.SlugRelatedField(read_only=False, slug_field="revision",
source="push",required=False,
queryset=Push.objects.all())
original_revision = serializers.SlugRelatedField(read_only=True, slug_field="revision",
source="original_push")
push_timestamp = TimestampField(source="push", read_only=True)
prev_push_revision = serializers.SlugRelatedField(
read_only=True, slug_field="revision", source="prev_push"
Expand Down

0 comments on commit e4cb1c2

Please sign in to comment.