Repository navigation
CI: backend tests on 4 workers, so the job finishes inside its timeout - #28
Merged
Merged
Conversation
… timeout The backend job ran 4,120 tests one at a time and needed about 45 minutes, so it hit its 15 minute limit on every run and no image was ever pushed. With pytest-xdist on 4 workers (each with its own PostgreSQL, Redis and object store containers) the full suite with coverage takes 7.5 minutes on a 4-CPU machine. The job limit goes to 30 minutes for a slower runner. The workflow also runs when infra/compose/postgres/initdb changes, because the tests build their database from those role scripts.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
backend/check.shrunspytest -n 4(addspytest-xdistas a dev dependency).backendchecks job timeout goes from 15 to 30 minutes.backendworkflow also runs wheninfra/compose/postgres/initdb/**changes;tests/conftest.pybuilds the test database from those scripts.Why
The backend job has never passed: 4,120 tests ran serially, about 45 minutes on CI, and the 15 minute limit cancelled every run. So no image was pushed and the deploy workflow skipped every time.
Proof
pytest -n 4: 4120 passed in 7m27s, coverage 97.55% (gate 90%).infra/test/resolve-release.sh: all pass.The CI run on this PR is the check that matters: it should finish well inside 30 minutes.