Skip to content

ci: add Testing Farm test via tmt for Konflux CI#4515

Open
Roshan-R wants to merge 3 commits into
coreos:mainfrom
Roshan-R:tmt-testing
Open

ci: add Testing Farm test via tmt for Konflux CI#4515
Roshan-R wants to merge 3 commits into
coreos:mainfrom
Roshan-R:tmt-testing

Conversation

@Roshan-R
Copy link
Copy Markdown
Contributor

Add tmt test infrastructure to hook into Konflux CI via Testing Farm

The new test pulls the newly built coreos-assembler container image and verifies that it can successfully build a Fedora CoreOS image from scratch using a fedora-coreos-config checkout.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a TMT-based testing framework for coreos-assembler, including Tekton integration for Testing Farm, TMT plans, and a test script for containerized builds. The reviewer identified several improvement opportunities: replacing hardcoded Git references in the Tekton configuration with dynamic parameters, refining the list of required packages in the TMT plan to include podman, and enhancing the test script's reliability by ensuring directory existence and applying proper variable quoting.

Comment thread .tekton/testing-farm.yaml Outdated
Comment on lines +19 to +21
value: https://github.com/Roshan-R/coreos-assembler
- name: GIT_REF
value: tmt-testing
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The GIT_URL and GIT_REF parameters are currently hardcoded to a personal fork and a specific branch (Roshan-R/coreos-assembler and tmt-testing). For integration into the main repository, these should be updated to point to the official repository or use dynamic Tekton parameters to ensure the tests are executed against the correct source code.

Comment thread tmt/plans/main.fmf Outdated
Comment on lines +7 to +9
- wget
- jq
- git
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The packages wget, jq, and git are being installed in the test environment but do not appear to be used by the host-side test.sh script. The git command used in the test is executed inside the coreos-assembler container. Conversely, the script relies on podman, which should be explicitly listed if it is not guaranteed to be present in the base image.

      - podman

Comment thread tmt/tests/test.sh Outdated

# IMAGE_URL is the coreos-assembler image that is built by konflux for each run.
export COREOS_ASSEMBLER_CONTAINER="$IMAGE_URL"
export COSA_DIR=$HOME/workspace/build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

It is recommended to ensure that the $COSA_DIR directory exists before it is mounted as a volume. If the directory is missing, podman might create it with root ownership, which can lead to permission issues for the builder user inside the container. Additionally, quoting the path is a best practice to handle potential spaces.

Suggested change
export COSA_DIR=$HOME/workspace/build
export COSA_DIR="$HOME/workspace/build"
mkdir -p "$COSA_DIR"

Comment thread tmt/tests/test.sh Outdated
Comment on lines +10 to +12
podman run --rm --security-opt=label=disable --privileged \
-v=${COSA_DIR}:/srv/ --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa ${COREOS_ASSEMBLER_CONTAINER} "$@";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The volume mount and image variable should be quoted to prevent word splitting or issues with special characters. Also, the trailing semicolon at the end of the command is unnecessary in a bash script.

Suggested change
podman run --rm --security-opt=label=disable --privileged \
-v=${COSA_DIR}:/srv/ --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa ${COREOS_ASSEMBLER_CONTAINER} "$@";
podman run --rm --security-opt=label=disable --privileged \
-v "${COSA_DIR}:/srv/" --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v /var/tmp:/var/tmp --name=cosa "${COREOS_ASSEMBLER_CONTAINER}" "$@"

@Roshan-R
Copy link
Copy Markdown
Contributor Author

Roshan-R commented Apr 1, 2026

/retest

4 similar comments
@Roshan-R
Copy link
Copy Markdown
Contributor Author

Roshan-R commented Apr 8, 2026

/retest

@joelcapitao
Copy link
Copy Markdown
Member

/retest

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/retest

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/retest

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a testing framework using tmt for coreos-assembler, including a new test plan, a build test script, and updates to the Tekton pipeline for memory resource management. Feedback suggests adding the fetch flag to the build command to ensure necessary metadata is downloaded, increasing the allocated disk space to prevent out-of-space errors during image generation, and removing a fixed container name in the podman command to avoid potential naming conflicts.

Comment thread tmt/tests/test.sh Outdated
Comment thread tmt/plans/main.fmf Outdated
Comment thread tmt/tests/test.sh Outdated
set -x
podman run --rm --security-opt=label=disable --privileged \
-v="${COSA_DIR}":/srv/ --device=/dev/kvm \
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa "${COREOS_ASSEMBLER_CONTAINER}" "$@";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using a fixed name --name=cosa for the podman container can lead to conflicts if the test environment is reused or if multiple tests are run in parallel on the same host. Since the container is run with --rm, the name is not strictly necessary for identification. It's safer to omit it.

Suggested change
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa "${COREOS_ASSEMBLER_CONTAINER}" "$@";
--device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp "${COREOS_ASSEMBLER_CONTAINER}" "$@";

Comment thread tmt/tests/test.sh Outdated
mkdir -p "$COSA_DIR"
cosa init --force https://github.com/coreos/fedora-coreos-config --branch testing-devel
# Test if the newly built container can build the fcos image
cosa build
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.

let's also run a set of test.
See

kola(cosaDir: "/srv", addExtTests: ["${env.WORKSPACE}/ci/run-kola-self-tests"])

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/retest

@Roshan-R Roshan-R force-pushed the tmt-testing branch 2 times, most recently from 51dbef0 to fa6e4a4 Compare May 5, 2026 09:02
@Roshan-R
Copy link
Copy Markdown
Contributor Author

Roshan-R commented May 8, 2026

/retest

…e memory for prepare-sboms

Bump the pipeline-docker-build-multi-platform-oci-ta bundle to the latest
hash.

The prepare-sboms step in the build-images task requires more memory with
our current workload and was hitting OOM. Increase memory requests and
limits to 2Gi to ensure reliable execution.
Add tmt test infrastructure to hook into Konflux CI via Testing Farm

The new test pulls the newly built coreos-assembler container image and
verifies that it can successfully build a Fedora CoreOS image from
scratch using a fedora-coreos-config checkout.

It will also run kola tests by `cosa init` into fedora-coreos-config
and running `kola run` and also the upgrade test using `kola runupgrade`
Copy link
Copy Markdown
Member

@c4rt0 c4rt0 left a comment

Choose a reason for hiding this comment

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

Just a comment based on today's Jenkins experience.

Comment thread tmt/tests/kola.fmf
TEST_CASE: test-qemu

/test-kola-upgrade:
duration: 1h
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.

Just wondering here if 1h here is sufficient. Honestly I have no idea if Konflux is any faster then Jenkins, but just today we witnessed CDN timeouts that caused a lot of failures.

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.

The tests have been consistently passing in about 25–35 minutes in previous runs, which is why I set the timeout to 1 hour. I also haven’t seen failures caused by CDN timeouts before. Do you think it makes sense to increase it to 2 hours just to be safe?

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.

With Dusty's recent workaround (merged only today) the upgrade test should be more... resilient. His change detect's the CDN stall and restarts zincati. That said, this process still takes time, bumping said value could be some form of a safety net. I really don't have strong opinions here - just something to consider.

@Roshan-R Roshan-R force-pushed the tmt-testing branch 2 times, most recently from 816f027 to 3c5bfc2 Compare May 18, 2026 08:56
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.

4 participants