Skip to content

kola/harness: fix rerun success logic#4559

Open
nikita-dubrovskii wants to merge 1 commit into
coreos:mainfrom
nikita-dubrovskii:fix_rerun_logic
Open

kola/harness: fix rerun success logic#4559
nikita-dubrovskii wants to merge 1 commit into
coreos:mainfrom
nikita-dubrovskii:fix_rerun_logic

Conversation

@nikita-dubrovskii
Copy link
Copy Markdown
Contributor

When tests pass on rerun but lack allow-rerun-success tags, preserve the original error. When rerun fails, use the rerun error. Only reset to success when rerun passes AND tests have required tags.

Issue: #4546

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 refactors the test rerun logic in mantle/kola/harness.go to explicitly handle four scenarios based on rerun results and success tags. The feedback suggests adding a log message for the scenario where a rerun passes but the original failure is preserved due to missing tags, which helps avoid user confusion when seeing a 'PASS' followed by an overall 'FAIL'.

Comment thread mantle/kola/harness.go Outdated
Comment thread mantle/kola/harness.go Outdated
runErr = reRunErr
}

// else: Scenario 3 - keep original runErr (test passed on rerun but doesn't allow rerun success)
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.

Why would we want this behaviour ? That feels like a waste to throw an error if a rerun worked.
This scenario would likely just end up in someone notice it and go add the rerun tag.

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.

That's how this feature is supposed to work: return SUCCESS only when the tagged test(s) pass on rerun. When this feature was added, mostly the needs-internet tests were flaky, so this tag is hardcoded in the pipeline. But we do rerun any failed test, as far as I remember, to gather some statistics on which other tests and tags are also flaky. If they succeed on rerun, we would otherwise not be notified about failures from the first run.

When tests pass on rerun but lack allow-rerun-success tags,
preserve the original error. When rerun fails, use the rerun error.
Only reset to success when rerun passes AND tests have required tags.

Issue: coreos#4546
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 22, 2026

@nikita-dubrovskii: 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 330f472 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.

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.

2 participants