Bench watchdog: polls ECR, runs smoke tests, and alerts on failure
Project description
krabby-bench
Bench watchdog for the Krabby locomotion stack. Polls ECR for new mainline-latest digests, runs a firmware smoke test when one appears, and alerts on failure.
Install
pip install krabby-bench
Config
Default config path: /etc/krabby-bench/config.toml
[ecr]
repo = "632914961627.dkr.ecr.us-east-1.amazonaws.com/krabby-locomotion"
tag = "mainline-latest"
region = "us-east-1"
poll_interval = 60 # seconds
[smoke]
firmware_channel = "mainline"
run_hal_check = false # set true to also start/stop container and check telemetry
[alert]
mode = "email" # "email" | "github" | "both"
dedup_window = 3600 # suppress repeat alerts for the same failure within this window (seconds)
[smtp]
host = "smtp.example.com"
port = 587
user = "user@example.com"
password = "secret"
from = "krabby-bench@example.com"
to = "oncall@example.com"
[github]
repo = "owner/krabby-research"
token = "ghp_..."
Smoke test
For each new digest the watchdog:
- Runs
krabby firmware update <channel>(flashes all three boards). - Runs
krabby firmware showand parses the version strings. - Asserts all three boards report the same version.
- Fetches
https://krabby-firmware-public.s3.amazonaws.com/<channel>/latest.jsonand checks the reported version matches the S3 manifest.
systemd
Copy the unit and timer files, then enable:
sudo cp bench/systemd/krabby-bench.service /etc/systemd/system/
sudo cp bench/systemd/krabby-bench.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now krabby-bench
Monitor:
journalctl -fu krabby-bench
Force a failure (test alert path)
Unplug one Mega, then push a dummy commit to mainline to trigger a new ECR digest. Within one poll cycle the watchdog should detect the new digest, run the smoke test, and fire an alert.
To reset: replug the board, let the next poll cycle pass, confirm no new alert.
State file
/var/lib/krabby-bench/state.json — persists the last-tested digest and last-alert metadata. Delete it to force a re-test on the next poll.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file krabby_bench-0.1.0-py3-none-any.whl.
File metadata
- Download URL: krabby_bench-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a64ed8bc76c52a15baeb27fb2f515961b6abb70ed9586ead812727fff0b9090
|
|
| MD5 |
2d4223dfd2d28bf15c9f8ed02da0ff49
|
|
| BLAKE2b-256 |
13ed03d3427c7a609d1619ea84029bcd6e1c6c7efebd0d0af408756d6be7d917
|