Expand description
The job a runner took and the job’s log, read from inside its container while it runs. A small script, run with
docker exec as root, waits for the runner’s _diag/Worker_*.log, prints the job’s ID (check_run_id) and run
ID from the job message there, then follows the job’s log pages in _diag/pages, which the runner writes in
4 KiB blocks and deletes once uploaded: the script hard-links each page so none is lost, and prints what it
has not printed before. These pages are what GitHub shows, with secrets already masked by the runner.
The script’s output: @@job <id> <run id>, then @@page <page> <offset> <length> followed by exactly that
many bytes, and @@end <page> once a page is complete. Parser turns it into whole lines and the position to
resume from, so a restarted daemon continues where the stored log ends.
Structs§
- Parser
- Turns the script’s output, in chunks of any size, into
Captured.
Enums§
- Captured
- What the script reported.
Constants§
- MAX_
LINE - The longest line kept: the rest of a longer one is dropped as it arrives, so one line never holds more memory.
- SCRIPT
- The script;
bash -c SCRIPT capture <page> <offset>resumes at that page and byte offset.
Functions§
- command
- The
docker execcommand line that captures a job frompositionon.