Skip to content

circus-server: parse Nix's internal-json logs and render structured build logs#126

Open
NotAShelf wants to merge 4 commits into
mainfrom
notashelf/push-pownxkwwrzpt
Open

circus-server: parse Nix's internal-json logs and render structured build logs#126
NotAShelf wants to merge 4 commits into
mainfrom
notashelf/push-pownxkwwrzpt

Conversation

@NotAShelf

Copy link
Copy Markdown
Member

We had previously written Cognos for parsing Nix's ATerm formatted logs. We can now use it to parse build logs in Circus and render them at /log instead of plaintext router endpoints.

Sorry for the diff it's mostly the preview fixtures.

@NotAShelf NotAShelf requested a review from amaanq June 24, 2026 14:38
@NotAShelf NotAShelf force-pushed the notashelf/push-pownxkwwrzpt branch from 76d78f5 to fa5b417 Compare June 24, 2026 14:39
amaanq
amaanq previously approved these changes Jun 27, 2026
};
}

pub(super) fn parse_build_log(raw: &str) -> BuildLogView {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but, we render every log line as its own element with no cap, so logs that span hundreds of thousands of lines could potentially make this a slow page. I have not benchmarked this, this is just more of a theoretical concern. We could cap it at 10k (arbitrary choice), and add a link to view the full raw log.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 53da7e5 ?

NotAShelf added 3 commits July 6, 2026 20:52
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I37150b4f562e86c70994adf3922697d46a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iab3c2f3380a61768f6481d02eeba282d6a6a6964
So we don't pollute SLoC as a metric :p

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I21afa25c73d29e28e90628c947ff98526a6a6964
`content-visibility:auto` lets the browser skip layout/paint for log-line
elements outside the viewport so multi-hundred-thousand-line logs render
at the same cost as short ones without truncating any content. Great
success!

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id7875ada9eaaf10d6643fe755338c7b76a6a6964
@NotAShelf NotAShelf requested a review from amaanq July 6, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants