Skip to content

ci: deal better with hanging tests #1624

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dscho
Copy link
Member

@dscho dscho commented Dec 19, 2023

I frequently run into CI that times out due to hanging tests. This is an attempt to help with that. This patch series starts out with two slightly-related fixes, then establishes the paradigm with the win test matrix, and then applies the same paradigm to the rest of the jobs that run Git's test suite.

When two jobs upload artifacts of the same name, a kind of merge
happens, and if they write files with the same name, the last one wins.

That is undesirable for the artifact that contains failed tests, so
let's use different artifact names per job for those.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `workspace` attribute does not exist in the `runner` context, but of
the `github` context, so let's use the latter. For details, see:
https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When tests hang, we do not see anything in the output, and the job just
times out after 6 hours (!). To add insult to injury, the timeout
prevents the `failed-tests-windows` artifact from being uploaded that is
supposed to help with diagnosing the issue better.

So let's first establish a generous timeout of 20 minutes for the
`win test` matrix jobs (they typically take less than 10 minutes),
and then handle the timed-out tests in addition to the failed ones,
using the presence of a `.out` file in `t/test-results/` combined with
the absence of a `.exit` file as a strong indicator that the
corresponding test timed out.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Exactly like we just did with the `win test` jobs, let's establish
timeouts for the other jobs that run Git's test suite (giving the ASAN
and macOS jobs 60 minutes, all other jobs 20 minutes to finish, which is
generous), and detect timed-out tests and handle them the same as failed
ones.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Dec 19, 2023
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.

1 participant