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

osbuildmonitor: add new package to monitor osbuild output #1047

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Nov 15, 2024

[draft until I have integrated this into either ibuilder(image-builder-cli)/bootc-image-builder) to show that it has no gaps, but wanted to show it here for early feedback]

This commit adds support for the jsonseq based monitoring that
osbuild provides. This is useful for human/machine readable status
reporting.

Note that the provided information is intentionally small right now,
we will need to go over the osbuild implementation and cleanup
some of the reporting, especially around error reporting from osbuild
(see osbuild/osbuild#1831).

The two main use-cases this should cover right now:

  1. Allow to hide all low-level osbuild output when run on the terminal and show only progress information
  2. Write a log file from "Trace" lines so that the full build can be easily reviewed or in case of errors reported

This commit contains an abreviated version of an osbuild jsonseq
output log. Most of the repetitive data from the curl and rpm
stages got removed as they don't add (much) to the understanding.

The data was generated via:
```
$ sudo python3 -m osbuild --libdir . --monitor JSONSeqMonitor \
   --export image --output-directory /tmp/out \
   ./test/data/manifests/fedora-boot.json > osbuild-status-output.json
```
This commit adds support for the jsonseq based monitoring that
osbuild provides. This is useful for machine readable status
reporting.
This commit adds a `Status.Trace` string in the osbuildmonitor.

Trace contains a single log line, usually very low-level or
stage output bug useful for e.g. bug reporting. Should in
general not be displayed to the user but the concatenation
of all "trace" lines should give the same information as
running osbuild on a terminal.
This commit adds `Status.Timestamp` so that it's easier to correlate
what took how long when reconstructing the log (e.g. for bugreporting).

See also:
https://github.com/osbuild/images/compare/main...mvo5:osbuildmonitor-testdata?expand=1
for the full log.
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.

1 participant