Skip to content

Commit dc979a3

Browse files
authored
[BE] Limit trunk failure alerts to viable-strict breaking failures (#6927)
Denoises alerts by limiting them to the most important viable/strict upgrade blocking failures Testing: Ran script locally to verify it only considered the expected set of workflows
1 parent f05de99 commit dc979a3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/check-alerts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- repo: pytorch/pytorch
2121
branch: main
2222
with_flaky_test_alerting: YES
23-
job_filter_regex: ""
23+
job_filter_regex: "^(pull|trunk|lint|linux-binary-)"
2424
- repo: pytorch/pytorch
2525
branch: nightly
2626
with_flaky_test_alerting: NO

tools/torchci/check_alerts.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,9 @@ def handle_flaky_tests_alert(
524524
def filter_job_names(job_names: List[str], job_name_regex: str) -> List[str]:
525525
if job_name_regex:
526526
return [
527-
job_name for job_name in job_names if re.match(job_name_regex, job_name)
527+
job_name
528+
for job_name in job_names
529+
if re.match(job_name_regex, job_name, re.IGNORECASE)
528530
]
529531
return job_names
530532

@@ -545,7 +547,7 @@ def check_for_recurrently_failing_jobs_alert(
545547
elif len(filtered_job_names) == len(job_names):
546548
print("All jobs matched the regex")
547549
else:
548-
print("\n".join(filtered_job_names))
550+
print("\n".join(sorted(filtered_job_names)))
549551

550552
(jobs_to_alert_on, flaky_jobs) = classify_jobs(
551553
job_names, sha_grid, filtered_job_names

0 commit comments

Comments
 (0)