This is an automated email from the ASF dual-hosted git repository. vterentev pushed a commit to branch flaky-test-detection in repository https://gitbox.apache.org/repos/asf/beam.git
commit fd33496cdb9c17999fd2e78f99685c40cb0a42f0 Author: Vitaly Terentyev <[email protected]> AuthorDate: Wed Dec 10 17:45:36 2025 +0400 Handle cancelled workflow runs in flaky test detection tool --- .../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"],
