Skip to content

kola --allow-rerun-success allows rerun success for any test #4546

@dustymabe

Description

@dustymabe

The original intent was that you'd allow rerun success for only tests that met certain conditions. For example kola run --rerun --allow-rerun-success tags=needs-internet but apparently this doesn't work as intended because even if a test doesn't have the needs-internet tag the framework will accept rerun success as success:

To show this I forced a failure with this in f-c-c:

$ git diff
diff --git a/tests/kola/files/aleph-version b/tests/kola/files/aleph-version
index acea8873..41a29f5e 100755
--- a/tests/kola/files/aleph-version
+++ b/tests/kola/files/aleph-version
@@ -10,5 +10,6 @@ set -xeuo pipefail
 # shellcheck disable=SC1091
 . "$KOLA_EXT_DATA/commonlib.sh"
 
+fatal 'forced failure'
 jq . < /sysroot/.coreos-aleph-version.json >/dev/null
 ok aleph

Then you can see it fail and attempt a rerun even with some fabricated tag:

Details
[coreos-assembler]$ cosa kola run --rerun --allow-rerun-success tags=foo '*aleph*'                                                                                                           
kola -p qemu run --rerun --allow-rerun-success tags=foo *aleph* --output-dir tmp/kola
=== RUN   ext.config.files.aleph-version
systemctl status kola-runext-19.service:
× kola-runext-19.service
     Loaded: loaded (/etc/systemd/system/kola-runext-19.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Tue 2026-05-05 13:29:03 UTC; 107ms ago
   Duration: 15ms
 Invocation: 766bced3c00242f9aa16ae6f10178afe
    Process: 1930 ExecStart=/usr/local/bin/kola-runext-aleph-version (code=exited, status=1/FAILURE)
   Main PID: 1930 (code=exited, status=1/FAILURE)
   Mem peak: 1.2M
        CPU: 5ms

May 05 13:29:03 qemu0 systemd[1]: Started kola-runext-19.service.
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: + . /var/opt/kola/extdata-19/commonlib.sh
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: ++ IFS=' '
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: ++ read -r -a cmdline
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: + fatal 'forced failure'
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: + echo 'forced failure'
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: forced failure
May 05 13:29:03 qemu0 kola-runext-aleph-version[1930]: + exit 1
May 05 13:29:03 qemu0 systemd[1]: kola-runext-19.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:29:03 qemu0 systemd[1]: kola-runext-19.service: Failed with result 'exit-code'.
--- FAIL: ext.config.files.aleph-version (25.29s)
        harness.go:1308: kolet failed: : kolet run-test-unit failed:  Error: Unit kola-runext-19.service exited with code 1
2026-05-05T13:29:03Z cli: Unit kola-runext-19.service exited with code 1: Process exited with status 1
FAIL, output in tmp/kola


======== Re-running failed tests (flake detection) ========

=== RUN   ext.config.files.aleph-version
systemctl status kola-runext-19.service:
× kola-runext-19.service
     Loaded: loaded (/etc/systemd/system/kola-runext-19.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Tue 2026-05-05 13:29:29 UTC; 99ms ago
   Duration: 18ms
 Invocation: f805affa0d0a40dcba14ee87fb59f2ab
    Process: 1933 ExecStart=/usr/local/bin/kola-runext-aleph-version (code=exited, status=1/FAILURE)
   Main PID: 1933 (code=exited, status=1/FAILURE)
   Mem peak: 1.2M
        CPU: 5ms

May 05 13:29:29 qemu0 systemd[1]: Started kola-runext-19.service.
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: + . /var/opt/kola/extdata-19/commonlib.sh
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: ++ IFS=' '
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: ++ read -r -a cmdline
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: + fatal 'forced failure'
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: + echo 'forced failure'
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: forced failure
May 05 13:29:29 qemu0 kola-runext-aleph-version[1933]: + exit 1
May 05 13:29:29 qemu0 systemd[1]: kola-runext-19.service: Main process exited, code=exited, status=1/FAILURE
May 05 13:29:29 qemu0 systemd[1]: kola-runext-19.service: Failed with result 'exit-code'.
--- FAIL: ext.config.files.aleph-version (26.56s)
        harness.go:1308: kolet failed: : kolet run-test-unit failed:  Error: Unit kola-runext-19.service exited with code 1
2026-05-05T13:29:29Z cli: Unit kola-runext-19.service exited with code 1: Process exited with status 1
FAIL, output in tmp/kola/rerun
Error: harness: test suite failed
2026-05-05T13:29:34Z cli: harness: test suite failed
failed to execute cmd-kola: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions