Skip to content

Conversation

@croissanne
Copy link
Member

@croissanne croissanne commented Oct 22, 2025

internal/osbuildexecutor: forward progress to composer

Uses status scanner to monitor osbuild to generate progress
updates. Progress updates are sent every 30 seconds.

Only one level of subprogress needs to be supported. Because osbuild
manifests consist of pipelines and stages, more than 2 levels of
progress are not expected.

As a followup this will need something in the cloudapi to actually expose the progress, but this is big enough of a change already, and will need some careful monitoring of the stage workers once deployed.

@croissanne croissanne requested review from a team and thozza as code owners October 22, 2025 15:04
@croissanne croissanne requested review from bcl and supakeen and removed request for a team October 22, 2025 15:04
@croissanne croissanne force-pushed the executor-with-logging branch 2 times, most recently from 0bc9425 to 854dd7b Compare October 22, 2025 16:47
@croissanne croissanne force-pushed the executor-with-logging branch from 854dd7b to 66c856d Compare October 27, 2025 10:09
@lzap
Copy link
Contributor

lzap commented Oct 29, 2025

The PR is ready for review but I see no changes, including that replace statement. I guess this was just a rebase.

@croissanne croissanne marked this pull request as draft November 3, 2025 09:08
@croissanne
Copy link
Member Author

The PR is ready for review but I see no changes, including that replace statement. I guess this was just a rebase.

Composer CI has this thing where it blocks execution if the PR is in a draft state (unless you manually click). Maybe we should change that.

@thozza
Copy link
Member

thozza commented Nov 3, 2025

The PR is ready for review but I see no changes, including that replace statement. I guess this was just a rebase.

Composer CI has this thing where it blocks execution if the PR is in a draft state (unless you manually click). Maybe we should change that.

You should use WIP+test label if you want tests to run for Draft PR. I'm not saying that we shouldn't reconsider the current state... 🙄

@thozza thozza added the WIP+test Work in progress but run Gitlab CI. label Nov 3, 2025
@croissanne
Copy link
Member Author

The PR is ready for review but I see no changes, including that replace statement. I guess this was just a rebase.

Composer CI has this thing where it blocks execution if the PR is in a draft state (unless you manually click). Maybe we should change that.

You should use WIP+test label if you want tests to run for Draft PR. I'm not saying that we shouldn't reconsider the current state... 🙄

ah thanks, had no idea!

@croissanne croissanne force-pushed the executor-with-logging branch from 66c856d to db61572 Compare November 4, 2025 16:14
@croissanne croissanne changed the title wip: executor with logging wip: executor with progress updates Nov 4, 2025
@croissanne croissanne force-pushed the executor-with-logging branch 3 times, most recently from 67363ed to 97efd0f Compare November 5, 2025 10:32
Changes with 0.210.0
----------------
  - Make bootupd metadata generation configurable per distro (osbuild/images#1958)
    - Author: Paul Whalen, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - many: add support for bootc container based anaconda ISOs (HMS-9495) (osbuild/images#1906)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza
  - osbuild/osbuild-exec: make osbuild command a variable (osbuild/images#1965)
    - Author: Sanne Raymaekers, Reviewers: Lukáš Zapletal, Simon de Vlieger

Changes with 0.211.0
----------------
  - Update osbuild dependency commit ID to latest (osbuild/images#1968)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - Update snapshots to 20251023 (osbuild/images#1967)
    - Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - deps: switch yaml libraries (osbuild/images#1970)
    - Author: Simon de Vlieger, Reviewers: Achilleas Koutsou, Michael Vogt
  - osbuild/monitor: increase status scanner buffer size to 16MiB (osbuild/images#1977)
    - Author: Sanne Raymaekers, Reviewers: Michael Vogt, Simon de Vlieger
  - osbuild: tweak how we can mock osbuild slightly (osbuild/images#1969)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Sanne Raymaekers
  - schutzbot/terraform: bump terraform sha (osbuild/images#1976)
    - Author: Florian Schüller, Reviewers: Achilleas Koutsou, Sanne Raymaekers, Simon de Vlieger

Changes with 0.212.0
----------------
  - distro,manifest: have a single `LoraxTemplates` type (osbuild/images#1975)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - distro: cleanup/reuse YAML for bootc ISO (osbuild/images#1971)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - distro: cleanup/reuse YAML for bootc distro (osbuild/images#1944)
    - Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger
  - distro: load distros from multiple files (osbuild/images#1974)
    - Author: Simon de Vlieger, Reviewers: Michael Vogt, Tomáš Hozza
  - osbuild: switch from a bufio.Scanner to a bufio.Reader (osbuild/images#1978)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - reporegistry: various cleanups (osbuild/images#1980)
    - Author: Michael Vogt, Reviewers: Simon de Vlieger, Tomáš Hozza
  - various: fix `make gh-action-test` and update README (osbuild/images#1981)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger

Changes with 0.213.0
----------------
  - data: update fedora 43 repositories (osbuild/images#1983)
    - Author: Simon de Vlieger, Reviewers: Michael Vogt, Sanne Raymaekers
  - osbuild-exec: add buildlog and monitor support (osbuild/images#1966)
    - Author: Sanne Raymaekers, Reviewers: Michael Vogt, Simon de Vlieger
Workers can forward progress information of jobs using a partial result
in a job update.
@croissanne croissanne force-pushed the executor-with-logging branch 2 times, most recently from 52fa952 to a0696d5 Compare November 5, 2025 11:01
@croissanne croissanne marked this pull request as ready for review November 5, 2025 11:08
@croissanne croissanne requested a review from mvo5 November 5, 2025 11:09
@croissanne croissanne force-pushed the executor-with-logging branch from 5f3f328 to 742b6d0 Compare November 6, 2025 10:26
@croissanne croissanne force-pushed the executor-with-logging branch 3 times, most recently from aa3adcc to 0007fbe Compare November 7, 2025 10:26
@croissanne croissanne marked this pull request as ready for review November 7, 2025 11:51
@croissanne croissanne force-pushed the executor-with-logging branch 8 times, most recently from 520b648 to e1ccac6 Compare November 7, 2025 13:33
Uses status scanner to monitor osbuild to generate progress
updates. Progress updates are sent every 30 seconds.

Only one level of subprogress needs to be supported. Because osbuild
manifests consist of pipelines and stages, more than 2 levels of
progress are not expected.

The result is still captured from stdout as before. The worker-executor
will stream the progress information over http, and save the result in a
separate file in the output archive.
@croissanne croissanne force-pushed the executor-with-logging branch 2 times, most recently from 8dece43 to aa9f0c5 Compare November 7, 2025 14:56
The progress output is streamed over HTTP. Stdout, which contains the
osbuild result, is captured separately and put in the output archive.

A separate log handler was added, so osbuild's stdout is always easily
retrievable, even in case of build failures.
If osbuild crashes on the worker-executor side its build endpoint will
return an error because it is unable to move the osbuild json result to
the output directory and create a tarball. This causes the status
scanner to error because it will receive invalid JSON.

Because the full stack trace coming from osbuild should be present in
the error that is handed back to the worker (so it can construct the job
result with all the error details), the osbuild output needs to be
fetched in case of build failures.

The status scanner will put the line it cannot scan into the error, but
it only reads up until the first newline. Thus osbuild's output cannot
be forwarded via the status scanner.
@croissanne croissanne force-pushed the executor-with-logging branch 9 times, most recently from b9f7af9 to 1026a45 Compare November 8, 2025 15:39
If osbuild fails its stdout should be captured and added to the error
details, also when using the ec2 executor. This test case makes sure
that the error details contain the stacktrace and the error message from
osbuild.
@croissanne croissanne force-pushed the executor-with-logging branch from 1026a45 to 1290bda Compare November 8, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP+test Work in progress but run Gitlab CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants