Skip to content

Commit 889ac54

Browse files
Fix cancelled run handling in flaky test prefetcher (#38579)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 489efaa commit 889ac54

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • .test-infra/metrics/sync/github/github_runs_prefetcher/code

.test-infra/metrics/sync/github/github_runs_prefetcher/code/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def filter_workflow_runs(run, issue):
182182

183183
success_rate = 1.0
184184
if len(workflow_runs):
185-
failed_runs = list(filter(lambda r: r.status == "failure" | r.status == "cancelled", workflow_runs))
185+
failed_runs = list(filter(lambda r: r.status == "failure" or r.status == "cancelled", workflow_runs))
186186
print(f"Number of failed workflow runs: {len(failed_runs)}")
187187
success_rate -= len(failed_runs) / len(workflow_runs)
188188

0 commit comments

Comments
 (0)