DNM: testing kola-self-ci tests #4561
Conversation
…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`
There was a problem hiding this comment.
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.
| 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*' |
There was a problem hiding this comment.
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.
| # prepare: | ||
| # - how: install | ||
| # package: | ||
| # - libvirt | ||
| # - qemu-kvm | ||
| # - qemu-img | ||
| # - virt-install | ||
| # - jq | ||
| # - git-core | ||
| # - skopeo | ||
| # - podman |
| prepare: | ||
| - how: install | ||
| package: | ||
| - podman |
There was a problem hiding this comment.
| CONFIG_GIT_URL="https://github.com/coreos/fedora-coreos-config" | ||
| CONFIG_GIT_REF="testing-devel" |
There was a problem hiding this comment.
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.
| 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}" |
| 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" | ||
| } |
There was a problem hiding this comment.
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.
|
/retest coreos-assembler-testing-x86-64-rosh |
|
/test coreos-assembler-testing-x86-64-rosh |
|
/retest |
No description provided.