libp2p / libp2p/test-plans

Automatically retry failing tests

Open
#155 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
65
Forks
82
PR merge metrics
No merged PRs in 30d

Description

Due to the number of moving parts, e2e tests tend to be a bit flakier than unit tests. We have one test in particular (Rust WebRTC) that fails every now and then: https://github.com/libp2p/rust-libp2p/actions/runs/4466390814/attempts/1

Whilst we have identified why it fails, we cannot currently upgrade because the latest version made some unfortunate breaking changes: https://github.com/webrtc-rs/webrtc/issues/413

Automatically retrying failing tests and marking them as flaky is not a new idea. New test runners like `nextest` incorporate such features: https://nexte.st/book/retries.html

Our interoperability job usually takes ~15 minutes. If it would take 2 minutes I wouldn't consider it worth it but having to wait for another 15 because 1 out of 100 e2e tests failed is a bit of a bummer.

Can we / Do we want to add something like this to our test runner? To make retries visible, we could output a "warning" annotation like the ones visible here: https://github.com/libp2p/rust-libp2p/actions/runs/4071431104

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Rust WebRTC failure in the interoperability job and review the linked nextest retry behavior and GitHub Actions warning annotations. Define the retry behavior for failing end-to-end tests, make flaky retries visible in the job output, and verify the interoperability job completes successfully after a transient failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.