repo¶
Manage the shared repository cache: list cached repos, clear a clone, clear a stuck lock, and maintain per-repo overrides.
| Subcommand | Description |
|---|---|
repo list |
List cached repos with commit, coverage profiles, and lock state |
repo delete <url> |
Wipe a repo's clone and coverage profiles (force a fresh clone) |
repo unlock <url> |
Inspect a lock; clear it if the owner is dead |
repo config set <url> |
Set per-repo overrides |
repo config get <url> |
Show per-repo overrides |
repo config rm <url> |
Remove per-repo overrides |
repo list¶
List every repo known to the system — the union of the Postgres repos, repo_configs, repo_locks tables and the on-disk cache.
| Flag | Description |
|---|---|
--json |
Emit the rows as JSON instead of a table. |
The table columns are ID, REPO, COMMIT, PROFILES, CONFIG (ref/test/crap/submodules/timeout/go_flags), and LOCK (free, owner@host (remaining), or EXPIRED).
repo delete¶
Remove a repository's clone and all of its coverage profiles from the shared cache. The next scan of that repo performs a fresh clone. Requires --yes.
| Flag | Description |
|---|---|
--yes |
Confirm the destructive action (refused without it). |
repo unlock¶
Inspect a repo lock and, if the owning worker is dead, clear it.
# inspect (no change)
go-crap-tracker repo unlock https://github.com/org/repo
# clear the lock
go-crap-tracker repo unlock https://github.com/org/repo --yes
The first run prints the owner, host, acquired and expiry times and the active/expired state. Re-run with --yes to force-clear.
| Flag | Description |
|---|---|
--yes |
Clear the lock (without it the command only inspects). |
repo config¶
Per-repo overrides are stored in Postgres and applied to every scan of that repository. set is a partial upsert: only flags you pass are changed, the rest keep their stored value.
repo config set¶
go-crap-tracker repo config set https://github.com/org/repo \
--ref release \
--test-args "-race ./pkg/..." \
--crap-args "--exclude,legacy/.*" \
--submodules \
--timeout 30m \
--go-flags "-p=1 -parallel=2"
| Flag | Description |
|---|---|
--ref |
Branch/tag to track (git ref). |
--test-args |
Args after go test (e.g. "-race ./pkg/..."). |
--crap-args |
Extra go-crap flags, comma-separated (e.g. "--exclude,pb/.*"). Empty string clears. |
--submodules |
Clone/update with git submodules. |
--timeout |
go test timeout (e.g. "30m"); "0" falls back to the global default. |
--git-timeout |
git operation timeout (e.g. "30m"); "0" falls back to the global default. |
--go-flags |
GOFLAGS for the repo's go test / go-crap subprocesses (e.g. "-p=1 -parallel=2"); bounds memory on constrained hardware. Empty clears. See Constrained Environments. |
At least one flag is required.
repo config get¶
go-crap-tracker repo config get https://github.com/org/repo
go-crap-tracker repo config get https://github.com/org/repo --json
Prints the stored ref, test args, crap args, submodules, timeout, go flags, and last-updated time. --json emits it as JSON.
repo config rm¶
Deletes the override so the repo falls back to defaults.
Related¶
- Repo Cache — how cloning, coverage reuse, and locking work.
- Constrained Environments — when and why to set
--go-flagson memory-limited hardware. - HTTP API —
POST/GET/DELETE /api/repo-configexpose the same overrides over REST.