Skip to content

kola/harness: Adjust stream-based denylist filtering for --qemu-image and unknown streams#4563

Open
Rolv-Apneseth wants to merge 3 commits into
coreos:mainfrom
Rolv-Apneseth:stream_skip
Open

kola/harness: Adjust stream-based denylist filtering for --qemu-image and unknown streams#4563
Rolv-Apneseth wants to merge 3 commits into
coreos:mainfrom
Rolv-Apneseth:stream_skip

Conversation

@Rolv-Apneseth
Copy link
Copy Markdown
Member

@Rolv-Apneseth Rolv-Apneseth commented May 25, 2026

This one may be a bit opinionated so I'm very open to differing opinions and/or feedback.

I ran into a scenario I found confusing with kola. I tried running kola run '*-rt-*' --qemu-image <rhel-10.2 image> and found that denylist entries for c10s were getting applied, which I found very unintuitive. This was because even when --qemu-image is passed by the user, the stream is still taken from the local build's meta.json.

While changing this behaviour, I also realised that when the stream can't be determined, the default is to apply stream-scoped entries anyway (skip the tests).

With these changes:

  1. When the user specifies --qemu-image, the stream is not read from the local build's meta.json
  2. When the stream can't be determined, stream-scoped denylist entries are not applied (tests are not skipped)

I think 2. makes more sense in most scenarios, not just when running a --qemu-image. If the stream can't be determined, the issue should probably be investigated (or if using a QEMU image, --denylist-stream should be used). The lone log line can easily be missed when the tests are just skipped by default, but is a lot more likely to get seen when tests are failing.

Also worth noting that this shouldn't affect the pipelines since we don't use --qemu-image and we always pass --build (always has stream from meta.json): https://github.com/coreos/coreos-ci-lib/blob/e570b12f44b28e69f18eac336c93b45e59466af3/vars/kola.groovy#L57

…can't be determined

When a denylist entry has defined streams, the default when the current
stream can't be determined is to skip the test anyway. This change
inverts the behaviour to avoid unintentionally skipping tests.

The example I ran into before making these changes was running kola
against a qcow2 image.
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 DiskImageIsUserProvided flag to track whether a QEMU disk image was explicitly provided. This flag is used in the test harness to skip reading stream metadata from meta.json when a custom image is used, and the logic for applying stream-scoped denylist entries has been updated accordingly. Review feedback suggested refining the warning message for undetermined streams to be more accurate and concise.

Comment thread mantle/kola/harness.go Outdated
@travier
Copy link
Copy Markdown
Member

travier commented May 26, 2026

Described logic sounds good to me. You have some misc whitespace changes mixed in the middle. Can you split those into a distinct commit?

@Rolv-Apneseth
Copy link
Copy Markdown
Member Author

Described logic sounds good to me. You have some misc whitespace changes mixed in the middle. Can you split those into a distinct commit?

Sorry - formatter. I'll split those out

… disk image

The disk image being tested may belong to a different stream so it
doesn't make sense to use the local build's stream. Prefer using
--denylist-stream.
@Rolv-Apneseth
Copy link
Copy Markdown
Member Author

/retest

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 26, 2026

@Rolv-Apneseth: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/rhcos 7c18687 link true /test rhcos

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Member

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

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

Nice catch, LGTM

@Rolv-Apneseth
Copy link
Copy Markdown
Member 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.

3 participants