Conversation
Member
Author
|
cc: @ppkarwasz |
Member
Author
|
Gentle nudge on this one, @dfoulks1 @ppkarwasz - the ASF Actions queue is looking very long again, and these are exactly the small fixes that make the tool we use to look at it more robust: stored repo list so a sweep does not re-discover 1200+ repos every time, progress output so a long sweep is not a black box, PMC grouping and totals so the snapshot is readable. Low risk - Note these two overlap (both add |
Squashed from five commits for a single rebase onto main. Generated-by: Claude Opus 5
potiuk
force-pushed
the
queue-status-progress-diagnostics
branch
from
September 16, 2026 15:58
32fd6bf to
0f4bdba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full org sweep of
actions-queue-status.pyruns for minutes behind a handful of terse lines, which makes a slow or partial run hard to explain after the fact. This adds coloured progress and diagnostics.What changed
Reporterowns everything the script prints: the colour vocabulary (cyan phases, dim detail, green success, yellow warnings, red errors), the progress bars, and thread-safe run counters.Trackeris its per-phase handle - a liverichbar on a terminal, one line every N steps when piped, so logs stay greppable.Phase 2/3), each closing with elapsed time and GraphQL points spent. When the REST phase is skipped because the sample covered everything, it says so instead of silently vanishing.Run diagnosticstable at the end: queries, retries, give-ups, batches split, repos skipped, REST requests, repos re-counted, points spent, wall time. Failure counters stay dim at zero and colour when they are not.-v/--verbose(retries with backoff and error, batch splits, discovery cursors, each REST re-count next to what GraphQL sampled),-q/--quiet,--no-color(also honoursNO_COLOR, for the bars too).--jsonon stdout stays machine-readable.showing top N of Mcaption and a colouredsourcecolumn.Drive-by fix
Writing the retry diagnostics surfaced a real defect: both retry loops slept their full backoff after the final attempt - up to 256s of dead wait before giving up. They now break out instead, which also makes the new "retrying in Ns" message truthful.
Verification
--repos-filerun againstapache/airflow(37 running jobs, re-counted over REST).ruff checkclean.README is updated in the same commit: the three new flags in the options table plus a "Progress and Diagnostics" section with sample output.
Example, mid-sweep:
Follow-up: totals on the tables
The org-wide total is printed once, above both tables, which is where it cannot be
read: with
--top 30of sixty active repos it has scrolled off by the time the tablebelow it has been. Each table now closes with a
TOTALrow - the same counts thesummary line and CSVs already carry, plus the active-repo count - and when
--toptruncates, a dim
shown (top N)row subtotals the visible rows.Follow-up: the discovered repo list is stored in the repo
Discovery walks every repository in the org before a single job is counted - the
slowest and most rate-limit-hungry phase of a sweep - and what it finds changes slowly.
The current answer is committed as
utils/apache-actions-repos.txt: 1258apacherepositories that define workflow files, ready to hand back with
--repos-file.--save-reposwrites throughwrite_repos_file(): ASF header, count, discovery date,names sorted rather than left in discovery's push order, which reshuffles every run.
A refresh should diff as the repos that joined and left, nothing else.
--repos-fileskips#lines, so the header survives the round trip.refresh with
--save-repos, and at 100 that command does not finish: two consecutivefull runs died on
HTTP 502, after 200 and 300 repositories, with every retryexhausted. The same paging at 50 walked all 3186 repositories without a single retry.
it must be refreshed - a stale list fails silently, reporting totals across the
repositories it was given with no way to know which are missing.
The stored list: 1258 repositories across 225 PMC prefixes
Repositories per PMC prefix, largest first. 69 prefixes hold a single
repository. The names themselves are in
utils/apache-actions-repos.txt."Which project is eating the runners" is a different question from "which repository is",
and several PMCs spread their CI over a dozen repos.
--by-pmcchanges the unit of thereport; both orderings, the
TOTALfooter,--top,--csvand--jsonare unchanged.The
Reposcolumn reads active / total - how many of a PMC's repositories have jobs now,out of every repository of theirs the sweep covered (
60 / 1258for a full org sweep).Four busy repos read differently for a PMC of four than for one of forty-seven.
A repo's PMC is the text before the first hyphen, the whole name when there is none -
the rule
actions-audit.py's--pmcalready uses and the README documents, so the twoscripts agree on what
sparkcovers, with no committee list and no network call. It isa naming convention, not authoritative ownership: an
incubator-repo groups underincubator, which the README states. TheSourcecolumn gives way to a repo count(which API counted a row is a per-repo fact a PMC can only blur); the CSV keeps it and
reads
mixedwhere a PMC's repos were counted different ways.Verification of the follow-ups
hidden rows tie out to
TOTAL; grouped sums equal the per-repo sums they came from.pmc_ofchecked on no-hyphen, multi-hyphen,incubator-*and owner-prefixed names.ungrouped;
--jsonand--csvshapes checked in both modes.scanned, 1258 with Actions, 881 jobs running and 330 queued across 60 repos.
pre-commitclean.Not verified: RAT could not be run locally (archive download blocked, and
utils/rat.shfails on macOS - its Java-version parse uses\?, a GNU-sed extensionBSD sed does not support). The header in the new
.txtis byte-identical toapproved_patterns.yml's and noinsert-licensehook covers.txt, so nothing stripsit - but CI's RAT job is the real check.
🤖 Generated with Claude Code
https://claude.ai/code/session_015veDEPK6ZLK9ot4NBQaC13
https://claude.ai/code/session_01LefMKj1fh7D2RxwNC6A4L5