This is an automated email from the ASF dual-hosted git repository.
jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new fc243b7c9d6 Handle cancelled workflow runs in flaky test detection
tool (#37072)
fc243b7c9d6 is described below
commit fc243b7c9d6d03ba38d5e9c3c9e7920bccfa8f73
Author: Vitaly Terentyev <[email protected]>
AuthorDate: Wed Dec 10 19:01:27 2025 +0400
Handle cancelled workflow runs in flaky test detection tool (#37072)
---
.../metrics/sync/github/github_runs_prefetcher/code/main.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git
a/.test-infra/metrics/sync/github/github_runs_prefetcher/code/main.py
b/.test-infra/metrics/sync/github/github_runs_prefetcher/code/main.py
index 5e9c22fc25f..044866813fa 100644
--- a/.test-infra/metrics/sync/github/github_runs_prefetcher/code/main.py
+++ b/.test-infra/metrics/sync/github/github_runs_prefetcher/code/main.py
@@ -182,7 +182,7 @@ async def check_workflow_flakiness(workflow):
success_rate = 1.0
if len(workflow_runs):
- failed_runs = list(filter(lambda r: r.status == "failure",
workflow_runs))
+ failed_runs = list(filter(lambda r: r.status == "failure" | r.status
== "cancelled", workflow_runs))
print(f"Number of failed workflow runs: {len(failed_runs)}")
success_rate -= len(failed_runs) / len(workflow_runs)
@@ -285,13 +285,12 @@ async def fetch_workflow_runs():
def append_workflow_runs(workflow, runs):
workflow_runs = {}
for run in runs:
- # Getting rid of all runs with a "skipped" status to display
- # only actual runs
+ # Getting rid of all "skipped" runs to display only actual runs
+ # Possible values for run["status"] are ["queued", "in_progress",
"completed"]
if run["conclusion"] != "skipped":
- status = ""
if run["status"] == "completed":
status = run["conclusion"]
- elif run["status"] != "cancelled":
+ else:
status = run["status"]
workflow_run = WorkflowRun(
run["id"],