Skip to content

Commit

Permalink
Populate the parent_signature when it's not sent as a query param (#8090
Browse files Browse the repository at this point in the history
)
  • Loading branch information
beatrice-acasandrei authored Jun 6, 2024
1 parent 0586af7 commit d26e643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/webapp/api/test_perfcompare_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def test_perfcompare_results_against_no_base(

assert response.status_code == 200
assert expected[0] == response.json()[0]
assert response.json()[0]["parent_signature"] is None


def test_perfcompare_results_with_only_one_run_and_diff_repo(
Expand Down Expand Up @@ -489,6 +490,7 @@ def test_perfcompare_results_subtests_support(

assert response.status_code == 200
assert expected[0] == response.json()[0]
assert response.json()[0]["parent_signature"] == test_perf_signature_2.id


@skip("test is frequently failing in CI, needs to be fixed, see bug 1809467")
Expand Down
4 changes: 3 additions & 1 deletion treeherder/webapp/api/performance_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,9 @@ def list(self, request):
"is_improvement": is_improvement,
"is_regression": is_regression,
"is_meaningful": is_meaningful,
"parent_signature": parent_signature,
"parent_signature": parent_signature
if parent_signature
else base_sig.get("parent_signature_id", None),
}

self.queryset.append(row_result)
Expand Down

0 comments on commit d26e643

Please sign in to comment.