You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leave Disabled Workflows and Old Runs Out of backlog_metrics.py's Failing Branches #4587
backlog_metrics.py --format json lists a branch as failing when a workflow's latest completed run on it failed, however old that run is, and whether or not the workflow still exists or is enabled. The branch read takes gh run list --branch over the latest runs, and branch_attention keys each workflow by its database id. Nothing checks the workflow against actions/workflows, and nothing bounds how old the deciding run may be. The window only bounds failed_runs_in_window.
So a workflow that was disabled or deleted after a failed run stays in failing_branches every week. A branch with no run in months is reported as failing now.
Why it matters
HomeAutomation-Config's scripts/fleet_attention.py reads the same branch state with two filters. It counts only workflows that still exist and are enabled, from repos/{o}/{r}/actions/workflows with state active. A run older than 30 days decides nothing. #4437 replaces that script with the hub's attention lists. Without these filters, the switch would bring back the false entries the script was written to keep out of the weekly mail.
Possible directions
These are for the hub to decide.
Drop a workflow that is not active in actions/workflows from failing_branches and recovered_branches.
Leave out a deciding run older than a bound, or report its age so a reader can weigh it.
Activity
Read the Attention Lists Under a Fine-Grained Token (#4590)