-
Notifications
You must be signed in to change notification settings - Fork 51
Labels
Description
Description
addons-server's test_main (x) CI jobs are slow. Those jobs run our Python tests through pytest, and the following things are slowing them down:
- Starting full services. Those jobs start a full local development environment, but really we only need a few services. We should avoid starting:
addons-frontend(no frontend necessary)worker(all celery tasks from unit tests should run in eager mode directly on the same container)rabbitmq(see above)elasticsearch (tests that need elasticsearch are already separate and not part oftest_main` jobs)nginx(no HTTP server necessary)
- Reinstalling prod dependencies. Installing
devdependencies on top of the production container is needed, but we should skip re-installingprodones: they are already there. - Recompiling locales. This is already done by building the
webcontainer. Furthermore, tests that need locales are already separate and not part oftest_mainjobs. - Doing a full initialize of the
webcontainer. This is completely useless, those jobs won't use the main database.
The total cost for all of these things can add up to a couple minutes, sometimes more.
In addition, we can look into increasing the number of jobs, which has been hardcoded at 14 since mozilla/addons-server#22318 but hasn't been updated as the number of tests rose. We've got over 8k tests now, so we likely want to hardcode 15 or 16 jobs if we're not going to have automated logic around that.
Finally, there are a number of optimizations to make in tests themselves, but outside of easy quick wins, that should be a separate ticket.
Acceptance Criteria
- Our CI completes faster
┆Issue is synchronized with this Jira Task
Reactions are currently unavailable