Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pytest-rerunfailures? #30

Open
billyvg opened this issue Jul 30, 2021 · 3 comments · Fixed by #40
Open

Support pytest-rerunfailures? #30

billyvg opened this issue Jul 30, 2021 · 3 comments · Fixed by #40

Comments

@billyvg
Copy link
Contributor

billyvg commented Jul 30, 2021

We currently use pytest-rerunfailures to re-run our flakey tests. These failures that get re-run and eventually succeed will still get annotated in GHA which causes some confusion for us. Would you be willing to add support for the rerun plugin?

I'm able to get it working using this:

    try:
        # If we have the pytest_rerunfailures plugin,
        # and there are still retries to be run,
        # then do not return the error
        import pytest_rerunfailures
        if item.execution_count <= pytest_rerunfailures.get_reruns_count(item):
            return
    except ImportError:
        pass
billyvg added a commit to getsentry/sentry that referenced this issue Jul 30, 2021
Vendoring the `pytest-github-actions-annotate-failures` package until pytest-dev/pytest-github-actions-annotate-failures#30 is closed.

We will now ignore failures if there are retries pending. This will get rid of the GHA annotations that appear on test suites that pass.
@utgwkk
Copy link
Member

utgwkk commented Jul 31, 2021

👍 (I didn't know pytest-rerunfailures plugin.)

billyvg added a commit to getsentry/sentry that referenced this issue Aug 2, 2021
Vendoring the `pytest-github-actions-annotate-failures` package until pytest-dev/pytest-github-actions-annotate-failures#30 is closed.

We will now ignore failures if there are retries pending. This will get rid of the GHA annotations that appear on test suites that pass.
@utgwkk
Copy link
Member

utgwkk commented Oct 24, 2021

I've just released version 0.1.4 containing #40 (fix of this issue). Thank you for your contribution! @billyvg

@utgwkk utgwkk reopened this Oct 25, 2021
@utgwkk
Copy link
Member

utgwkk commented Oct 25, 2021

Reopened due to #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants