Skip to content

ci: replace pytest-flaky with pytest-rerunfailures for explicit rerun visibility#1201

Open
securely1g wants to merge 1 commit into
sonic-net:masterfrom
securely1g:pytest-rerunfailures
Open

ci: replace pytest-flaky with pytest-rerunfailures for explicit rerun visibility#1201
securely1g wants to merge 1 commit into
sonic-net:masterfrom
securely1g:pytest-rerunfailures

Conversation

@securely1g
Copy link
Copy Markdown

Replace the bare pytest invocation with pytest-rerunfailures (--reruns 2 --reruns-delay 1) in the unit test CI pipeline.

The test_ProducerTable failure in build 1123755 was a flaky environmental issue (95.67% disk usage on the Azure agent). Adding automatic retries with visible RERUN markers will prevent such transient failures from blocking the pipeline while still surfacing which tests are flaky.

Before (bare pytest):

test_ProducerTable FAILED [ 26%]
=========== 1 failed, 37 passed ===========

After (pytest-rerunfailures):

test_ProducerTable FAILED [ 26%]
test_ProducerTable RERUN  [ 26%]
test_ProducerTable PASSED [ 26%]
=========== 38 passed, 1 rerun ===========

This mirrors the approach taken in sonic-swss (sonic-net/sonic-swss#4612).

Signed-off-by: Guohan Lu lianguohan@gmail.com

… visibility

Replace the bare pytest invocation with pytest-rerunfailures
(--reruns 2 --reruns-delay 1) in the unit test CI pipeline.

The test_ProducerTable failure in build 1123755 was a flaky
environmental issue (95.67% disk usage on the Azure agent). Adding
automatic retries with visible RERUN markers will prevent such
transient failures from blocking the pipeline while still surfacing
which tests are flaky.

Before:
  test_ProducerTable FAILED [ 26%]
  =========== 1 failed, 37 passed ===========

After (with reruns):
  test_ProducerTable FAILED [ 26%]
  test_ProducerTable RERUN  [ 26%]
  test_ProducerTable PASSED [ 26%]
  =========== 38 passed, 1 rerun ===========

Signed-off-by: Guohan Lu <lianguohan@gmail.com>
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Missing ID

  • ❌ The email address for the commit (be67143) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please visit our EasyCLA portal and chat with our support bot.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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