Skip to content

Automatic retry and rerunning failed tests #779

@lucianoliberti

Description

@lucianoliberti

Is your improvement proposal related to a problem? Please describe.

There is a requirement for a native feature that allows failed jobs to automatically rerun themselves a configurable number of times. This is specifically designed to manage flaky tests within the CI/CD pipeline more efficiently.

Currently, when a job containing multiple tests fails due to a small subset of those tests failing, it can cause the entire job to be marked as failed. An automatic retry mechanism would improve this workflow by allowing the system to trigger subsequent runs to attempt to reach a successful completion.

Key Requirements

  • Automatic Retry Logic: The ability for a job to automatically rerun itself up to a specified number of times (X) upon failure.
  • Targeted Reruns: A mechanism where the automatic retry triggers a new run that specifically executes only the tests that failed in the previous attempt, rather than the entire suite.

Use Case

A CI job runs a suite of tests (e.g., 10 tests). If a small number of these tests fail (e.g., 3 tests), the automatic retry feature would initiate a new run for only those 3 failed tests. If those tests pass on the subsequent attempt, the job can move toward a successful completion.

Describe the solution you'd like

TBD

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsolution-tbdSolution information to be defined

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions