Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Stream run logs over the runner's SSH channel

5ece70a50ebda392626b92bdf29d28bc9b444954 · Keenan Nemetz · 10d ago · parent fdf2340f

Stream run logs over the runner's SSH channel

The runner wrote the log to a temp file and uploaded it as one LFS object
when the job ended, so a running job had no log to read and a log was stored
like a shared artifact even though it belongs to one attempt.

The runner sends 128 KiB chunks over the same runner channel that holds the
lease. The server appends them to data/logs/<repo>/<run>/<attempt>.log and
records the size while the run is still running. The finish record carries
the final size; the server checks the file length, syncs it, and stores the
result. A partial or failed stream leaves no log on the record.

Logs are no longer LFS objects: they are not shared, not content-addressed,
and the web serves the file directly, with range and step slices. GC no
longer treats them as LFS roots.

docs/operations.md +12−9

@@ -52,6 +52,7 @@ Back up the instance state:
52 52 ```sh
53 53 vole admin account backup backup/users.db # accounts, keys, sessions, rules, locks, views
54 54 sqlite3 data/runs.db ".backup 'backup/runs.db'" # CI history, queue, and approvals
55 cp -a data/logs backup/ # CI attempt logs
55 56 cp data/ssh_host_ed25519_key backup/ # the SSH host key
56 57 cp -a data/acme backup/ 2>/dev/null # TLS account key and certificates, if ACME is on
57 58 cp data/audit.log backup/ 2>/dev/null # history of admin actions
@@ -74,11 +75,11 @@ must be backed up with it.
74 75
75 76 ## Restore an instance
76 77
77 1. Restore `data/users.db`, `data/runs.db`, `data/ssh_host_ed25519_key`,
78 `data/audit.log`, and `data/acme/` if the instance obtains its own TLS
79 certificates.
78 1. Restore `data/users.db`, `data/runs.db`, `data/logs/`,
79 `data/ssh_host_ed25519_key`, `data/audit.log`, and `data/acme/` if the instance
80 obtains its own TLS certificates.
80 81 2. Restore the repositories under `data/repos/` and the object store under
81 `data/lfs/` if you keep CI logs and artifacts.
82 `data/lfs/` if you keep CI artifacts.
82 83 3. Run `vole admin index rebuild`.
83 84 4. Run `vole admin account revoke-sessions --all` so sessions from the restored copy
84 85 cannot outlive their cookies.
@@ -99,9 +100,10 @@ fetched, but only a maintainer can push them; existing change requests still nam
99 100 the same head commit. A contributor who wants to keep working pushes the same
100 101 commit under their new folder and opens a request from it.
101 102
102 Large files, CI logs, and build artifacts live in `data/lfs/`. Back that directory
103 up too if you need those files. `vole admin gc` treats files reachable from a
104 repository, an archived CI log, or a published artifact as things to keep.
103 Large files and build artifacts live in `data/lfs/`; CI logs live in `data/logs/`.
104 Back both directories up too if you need those files. `vole admin gc` treats files
105 reachable from a repository or a published artifact as things to keep; logs are
106 ordinary files and are not swept.
105 107
106 108 ## Clean up stored files
107 109
@@ -111,7 +113,8 @@ vole admin gc # remove unused files
111 113 vole admin gc --grace 24h # keep unused files for a day
112 114 ```
113 115
114 `vole admin gc` cleans the shared storage used by LFS, CI logs, and build artifacts. It
116 `vole admin gc` cleans the shared storage used by LFS and build artifacts. CI logs are
117 ordinary files under `data/logs/` and are not part of the sweep. It
115 118 also repairs each repository's links into that storage, so it helps when files
116 119 are missing or links are broken.
117 120
@@ -205,7 +208,7 @@ the linked sections explain each in full.
205 208 (2000) and `repo_max_metadata_bytes` (32 MiB) of documents on the metadata branch
206 209 (issues, requests, comments, approvals, and release records),
207 210 `repo_max_bytes` (5 GiB) of Git objects, and `repo_max_lfs_bytes` (10 GiB) of
208 LFS objects, logs and artifacts. The checks run in pre-receive, so a refused push
211 LFS objects and artifacts. The checks run in pre-receive, so a refused push
209 212 moves no refs, and the object bound is enforced on upload. When one bites, the
210 213 message names it: raise it in `vole.toml`, delete the branches or metadata that
211 214 are not wanted, or run `vole admin gc` to drop unreachable objects. Per-account