Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI UI: emit markup for grouping log lines #23

Closed
maxheld83 opened this issue Mar 13, 2025 · 2 comments
Closed

CI UI: emit markup for grouping log lines #23

maxheld83 opened this issue Mar 13, 2025 · 2 comments

Comments

@maxheld83
Copy link
Contributor

I'm having a hard time navigating flake-iter logs in CI (they're long 😅).

I'll use GitHub Actions as an example to motivate this.

I'd like to group the log lines by derivation for easier navigation.

So this:

2025-03-13T12:14:56.332927Z DEBUG flake_iter::cmd::build: Building derivation 1 of 4 drv="/nix/store/naagvgp1cpkhs8ab653a34qlah8b349d-treefmt-check.drv^*"
this derivation will be built:
  /nix/store/naagvgp1cpkhs8ab653a34qlah8b349d-treefmt-check.drv

Should mark the starting of something like this:

Image

Happy to take a swing at this, but wanted to check in first.

@maxheld83
Copy link
Contributor Author

maxheld83 commented Mar 13, 2025

Some initial thoughts:

  1. This is strictly a GHA issue, but the easiest/only way to implement might still be flake-iter.
    The alternative would be to post-process the logs in https://github.com/determinatesystems/ci, or some intermediary package/(flake?), but would probably necessitate a lot of regex and would introduce tight coupling between how flake-iter logs and some other software (weird -- there aren't usually stability guarantees about log formatting).
  2. GitLab has a similar feature, and probably more tools have similar features, though each with different markup see here.
    It there seems like a good idea to make this (the used markups) extensible, and not to hard-code GHA in flake-iter.
  3. There should be a (rust) logging library which already deals with this, and just intersperses the appropriate markup at flake-iter build-time, but I couldn't find such a tool.

Questions:

  • re: 2) Should this be GHA-only, or is it worth it to make this extensible?
  • re: 3) Should this even be in flake-iter? (The more I think about it, the more I think the whole logging-to-CI-markup-thing should be a feature of a logging library ...).

Sorry, something went wrong.

@maxheld83 maxheld83 changed the title CI UI: emit markup for CI UI: emit markup for grouping log lines Mar 13, 2025
@maxheld83
Copy link
Contributor Author

uh, I think doing this properly without scope-creeping flake-iter requires a lot more thought, and probably a separate library or finding one which does this already.

Might come back if I have a more constructive idea, closing for now.

Sorry about the noise.

@maxheld83 maxheld83 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2025
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

No branches or pull requests

1 participant