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

Integration with nix-output-monitor when available #129

Open
RaitoBezarius opened this issue Dec 4, 2022 · 1 comment
Open

Integration with nix-output-monitor when available #129

RaitoBezarius opened this issue Dec 4, 2022 · 1 comment

Comments

@RaitoBezarius
Copy link

Thank you for the amazing tool!

I would like to use nix-output-monitor for my local deployments, as they make the output nicer and more understandable.

What would the best way forward to send a PR on this?

I guess there is the parallel build matter, which I'm not sure how colmena handle it? Does it throw everything in a big list and let Nix build it? Therefore, nom should work out of the box?

@zhaofengli
Copy link
Owner

I think this is most easily done with the plain/verbose output style (-v) of Colmena where it doesn't try to redraw, so nix-output-monitor can print its fancy stuff. We can have a --nom mode (can be added here) that activates nom-specific behavior and launches nom during deployment, piping all output to it. At first glance, there are two things we need to change:

  • Colmena launches a separate nix-build for each node (Build each node individually #47), with the outputs interleaved with each other. As a result, nom's human-readable message parser can get confused. I think we need to use the JSON-based parser and launch the builds with --log-format internal-json -v.
  • With the plain output style, Colmena prefixes each line of output with the corresponding node name. This is helpful for users but doesn't work with nom's JSON parser. We need to drop the prefix if the event is stdout/stderr and the text starts with @nix.

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

2 participants