Repository navigation
feat(report): add a runner watchdog that toasts an offline runner or a long queue - #17
Merged
Merged
Conversation
…a long queue The weekly report says how the queue behaved; nothing said that it was wrong now. runner_watch.py reads the runners of the organisation and of each private repository plus the queued runs, and reports a runner seen offline for 10 minutes (the first sighting is remembered, GitHub does not say since when) or a run queued for 15, once per finding, through the desktop's notify.ps1. An ignored runner or an unreadable answer raises nothing.
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.
Summary
The weekly report says how the queue behaved over a period; nothing said that it was wrong now. A
runner that falls off the VM, or a run stuck for an hour, was found by whoever noticed.
report/runner_watch.pyreads, overgh, the runners of the organisation and of each privaterepository in it, plus the runs still queued, and raises one toast per finding through the desktop's
own
notify.ps1:--offline-minminutes (default 10); GitHub does not say since when, so thefirst sighting is remembered in a state file;
--queue-minminutes (default 15).A finding is reported once, and again only after it has cleared.
--ignore NAMEmutes a runner that isoffline on purpose. An unreadable answer (a 403, a network blip) is skipped, never reported.
Verification
tests/test_runner_watch.py: 20 tests (thresholds, once-only, recovery, ignore, collection with abroken endpoint, the real commands, toasts, state file); 166 tests pass together;
ruffclean.offline runner (
contrast-viewer-vm-02, retired on purpose) and no queued run.Notes
(
workstation-maintenance).