Skip to content

DNM: testing kola-self-ci tests #4561

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

DNM: testing kola-self-ci tests #4561
Roshan-R wants to merge 5 commits into
coreos:mainfrom
Roshan-R:tmp-tmt-testing

Conversation

@Roshan-R
Copy link
Copy Markdown
Contributor

No description provided.

Roshan-R added 4 commits May 13, 2026 13:28
…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
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 test plans and shell scripts for initialization, building, and running kola tests. Feedback includes addressing a container mounting issue where host paths are inaccessible, adding the missing uuidgen dependency to the environment preparation, and fixing potential unbound variable errors in the artifact collection trap. Additionally, it is recommended to remove commented-out configuration blocks and use environment variables for configurable git settings in the initialization script.

Comment thread tmt/tests/test.sh Outdated
Comment on lines +44 to +50
cosa kola list -E "${REPO_ROOT}/tests/kola-ci-self"
# self test
export KOLA_ACTION="run"
export KOLA_ID="kola-self"
export KOLA_EXTRA_ARGS=(
-E "${REPO_ROOT}/tests/kola-ci-self"
'ext.kola-ci-self*'
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 cosa function (defined in utils.sh) only mounts ${COSA_DIR} to /srv inside the container. The path ${REPO_ROOT}/tests/kola-ci-self is a host path and will not be accessible inside the container. You should either mount the repository root into the container or copy the tests into ${COSA_DIR} before running kola.

Comment thread tmt/plans/main.fmf
Comment on lines +12 to +22
# prepare:
# - how: install
# package:
# - libvirt
# - qemu-kvm
# - qemu-img
# - virt-install
# - jq
# - git-core
# - skopeo
# - podman
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

This block of commented-out code should be removed to keep the configuration clean, unless it is intended to be kept for documentation purposes.

Comment thread tmt/plans/main.fmf
Comment on lines +24 to +27
prepare:
- how: install
package:
- podman
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 script tmt/tests/utils.sh uses the uuidgen command (line 21), but it is not included in the prepare step's package list. This will cause run_kola to fail if uuidgen is not pre-installed in the environment.

prepare:
  - how: install
    package:
      - podman
      - util-linux

Comment thread tmt/tests/init.sh
Comment on lines +7 to +8
CONFIG_GIT_URL="https://github.com/coreos/fedora-coreos-config"
CONFIG_GIT_REF="testing-devel"
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

These configuration values are hardcoded. It would be more flexible to allow them to be overridden via environment variables, which can be set in the tmt plan.

Suggested change
CONFIG_GIT_URL="https://github.com/coreos/fedora-coreos-config"
CONFIG_GIT_REF="testing-devel"
CONFIG_GIT_URL="${CONFIG_GIT_URL:-https://github.com/coreos/fedora-coreos-config}"
CONFIG_GIT_REF="${CONFIG_GIT_REF:-testing-devel}"

Comment thread tmt/tests/utils.sh
Comment on lines +14 to +18
collect_kola_artifacts() {
mkdir -p "$TMT_TEST_DATA"
cd "${COSA_DIR}" && tar -C "${OUTPUT_DIR}" -c --xz "${KOLA_ID}" > "${KOLA_ID}-${TOKEN}.tar.xz"
cd "${COSA_DIR}" && mv "${KOLA_ID}-${TOKEN}.tar.xz" "${TMT_TEST_DATA}/${KOLA_ID}-${TOKEN}.tar.xz"
}
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 collect_kola_artifacts function uses variables OUTPUT_DIR and TOKEN which are only defined inside run_kola. If run_kola fails before these variables are assigned (e.g., at line 20), the trap handler will fail due to set -u (unbound variable). It is safer to initialize these variables at the top of the script or use default values in the function.

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/retest coreos-assembler-testing-x86-64-rosh

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/test coreos-assembler-testing-x86-64-rosh

@Roshan-R
Copy link
Copy Markdown
Contributor Author

/retest

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