Skip to content

imgtestlib: use image-builder cmd, drop cmd/build/ (HMS-10298)#2462

Draft
avitova wants to merge 4 commits into
osbuild:mainfrom
avitova:use-ib-not-build
Draft

imgtestlib: use image-builder cmd, drop cmd/build/ (HMS-10298)#2462
avitova wants to merge 4 commits into
osbuild:mainfrom
avitova:use-ib-not-build

Conversation

@avitova

@avitova avitova commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

I saw more possible approaches, such as splitting configs into two files: blueprint, and the options part. However, creating a temporary file for blueprint in /tmp sounds like a good option and keeps things clean. Let me know what you guys think.

Comment thread test/scripts/imgtestlib/build.py Outdated

cmd = [
"sudo", "-E", "./bin/image-builder", "build", image_type,
"--config", config_path,

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.

Where does --config come from?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are right, this was never supported. But tests passed locally previously; that is odd. I believe we ignore non-existent flags then?

@supakeen

supakeen commented Jun 25, 2026

Copy link
Copy Markdown
Member

You'll probably want to bump the Schutzbot seed if changing the build script I think?

@avitova avitova force-pushed the use-ib-not-build branch from fbe0efc to 2490225 Compare June 25, 2026 10:48
avitova added 3 commits June 25, 2026 14:03
Wire new CLI flags --bootc-remote and --image-size through manifest so
that test configs can be built via image-builder build/manifest.

Related: HMS-10855
This commit swaps usage of build in tests to using image-builder
directly.
After swapping from build to image-builder in tests, it is possible to
use options instead of solely just a config file. This commit extracts
options from the json config: --ostree-ref, --ostree-url,
--ostree-parent, --bootc-installer-payload-ref, --bootc-remote,
--image-size, and --extra-repo. It also extracts the blueprint part of
the config into a standalone file, so that it can be used for building
with image-builder.

Related: HMS-10855
@avitova avitova force-pushed the use-ib-not-build branch 3 times, most recently from eb1dfd3 to c657c12 Compare June 25, 2026 17:30
@avitova avitova changed the title imgtestlib: use image-builder cmd, drop cmd/build/ imgtestlib: use image-builder cmd, drop cmd/build/ (HMS-10298) Jun 25, 2026
@avitova avitova force-pushed the use-ib-not-build branch 2 times, most recently from ec75923 to b172aa9 Compare June 25, 2026 18:38
After swapping to image-builder from build, the CI for cross
architecture integration test is failing with `fuse: device not found,
try 'modprobe fuse' first`. This commit ensures it is present before
running integration tests.
@avitova avitova force-pushed the use-ib-not-build branch from b172aa9 to 725109a Compare June 26, 2026 09:39
@achilleas-k

Copy link
Copy Markdown
Member

While working on #2467, I saw this in the old bootc-image-builder github actions:

      - name: Workaround podman issues in GH actions
        run: |
          # see https://github.com/osbuild/bootc-image-builder/issues/446
          sudo rm -rf /var/lib/containers/storage
          sudo mkdir -p /etc/containers
          echo -e "[storage]\ndriver = \"overlay\"\nrunroot = \"/run/containers/storage\"\ngraphroot = \"/var/lib/containers/storage\"" | sudo tee /etc/containers/storage.conf

Might be what's needed to get that cross-arch build to work.
Still doesn't explain why it started failing now though.

Comment thread cmd/image-builder/main.go
manifestCmd.Flags().String("bootc-installer-payload-ref", "", `bootc installer payload ref`)
manifestCmd.Flags().String("bootc-default-fs", "", `default filesystem to use for the bootc install (e.g. ext4)`)
manifestCmd.Flags().Bool("bootc-no-default-kernel-args", false, `don't use the default kernel arguments`)
manifestCmd.Flags().Bool("bootc-remote", false, `use org.osbuild.skopeo sources instead of containers-storage`)

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.

I think using the osbuild stage names here isn't very helpful. We don't expect users of the CLI to know about osbuild internals so it's a bit of a layer violation, even though they appear in the output.
It'd be better to describe it in general terms, like:
"Pull bootc container from remote location instead of using it from local container storage"

The option could also use some workshopping. Maybe bootc-pull-container?

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.

3 participants