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

re-run failed tests triggers on failed coverage #21

Open
chrismeyersfsu opened this issue Aug 28, 2024 · 3 comments
Open

re-run failed tests triggers on failed coverage #21

chrismeyersfsu opened this issue Aug 28, 2024 · 3 comments
Assignees

Comments

@chrismeyersfsu
Copy link
Member

https://github.com/ansible/awx-plugins/actions/runs/10597353901/job/29367631346?pr=17

FAIL Required test coverage of 100% not reached. Total coverage: 40.78%

It looks like the re-run failed tests with higher verbosity triggers re-running ALL tests when the coverage check fails. In the case above all the tests passed both runs.

@webknjaz webknjaz self-assigned this Aug 28, 2024
@webknjaz
Copy link
Member

So… Re-runs are made to always fail so that they don't hide flakiness. There's a || exit 1 in the command. That is intentional.

The only problematic bit I noticed are tracebacks coming from commands_post.

Any other action item I'm missing?

@chrismeyersfsu
Copy link
Member Author

I think I'm wrong about coverage failure being the reason.

I was trying to point out that all tests pass (first screenshot)
image

Then the re-run seems to run ALL the tests. I would expect it to only re-run the tests that failed above (of which there are none) (second screenshot)
image

There is also an array index error but I think that may be related to coverage.

@webknjaz
Copy link
Member

No, the index error is related to the last verbose tox call w/o coverage collection. I only tested the first one because there were no failures in the skeleton. So reruns weren't triggered. I fixed that already.

The reruns are generic and trigger on any errors in previous GHA steps.

The pytest rerun is invoked with --lf to pick up the failed tests but since there's none, all are executed again. I think you're right that coverage likely causes the failure of that first testing invocation.

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

No branches or pull requests

2 participants