Skip to content

Drop deregistered repo runners from the board - #1

Merged
codephilip merged 1 commit into
mainfrom
fix/prune-repo-runners
Dec 2, 2026
Merged

codephilip merged 1 commit into
mainfrom
fix/prune-repo-runners

Conversation

@codephilip

Copy link
Copy Markdown
Owner

Deregistered repo runners stayed on the board forever. sync_runners took the scope from the key with key.split("/", 1)[0], which turns repo:owner/name/<id> into repo:owner, so the delete never matched; only org runners were pruned.

Seen on forge.lab: after the ci1 runners were consolidated into ci1-org-1..3, the old repo runners (ci1 for Rivalytics, ci1 and ci1-homelab for the deleted codephilip/homelab) still showed as online.

Now:

  • each scope that listed successfully is pruned to what GitHub returned, including down to nothing
  • runners of a repo or org no longer configured are dropped
  • a scope that fails to list (outage, 401) keeps what was known

Tests: tests/test_runners.py (3 of 4 failed before the fix). python3 -m unittest discover -s tests passes.

sync_runners took the scope from the runner key up to the first '/', which
cuts repo scopes (repo:owner/name/<id>) short, so only org runners were ever
pruned. Prune per listed scope instead, empty a scope with no runners left,
and drop runners of repos or orgs that are no longer configured.
@codephilip
codephilip merged commit 58ba8f1 into main Dec 2, 2026
2 checks passed
@codephilip
codephilip deleted the fix/prune-repo-runners branch December 2, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant