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.

server/ssh/server.go +3

@@ -27,6 +27,7 @@ import (
27 27
28 28 xssh "golang.org/x/crypto/ssh"
29 29
30 "github.com/rodent-software/vole/ci/logs"
30 31 "github.com/rodent-software/vole/ci/runs"
31 32 "github.com/rodent-software/vole/core/lfs"
32 33 "github.com/rodent-software/vole/forge"
@@ -81,6 +82,8 @@ type Config struct {
81 82 Runs *runs.Store
82 83 // LFS is the object store behind git-lfs-transfer.
83 84 LFS *lfs.Store
85 // Logs holds one file per CI attempt, streamed from the runner.
86 Logs *logs.Store
84 87 // LFSWarnBytes is handed to pre-receive as the threshold for suggesting LFS.
85 88 LFSWarnBytes int64
86 89 // Locks is the Git LFS lock table, keyed by account name. Nil means this server