-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
CI build runs slow due to redis and more #3820
Comments
So we're killing off #3440 to get rid of the Redis annoyance. I would object, but no one seems to use the runtime-configurable autoscale feature. It was built for UNHCR and they don't use it; just recently on OCHA, even I forgot about it when dealing with exactly the situation it was designed for. I think it's worth noting that when #3440 was made, it did not cause 40 seconds of wasted time during the CI build process. I'm not sure what has changed since then, but it doesn't feel like the last time we'll ever grapple with Python code trying to access a database when none is available. It's a fair point, though, that Django discourages talking to databases in I find #3863 dissatisfying because, while it cuts off a sore thumb, it does not address the overall issues mentioned in this issue. We should answer these questions:
Some further thoughts:
|
Regarding the original need to quickly scale celery, with the move to k8s we don't have to manually scale up workers. But if we did, I would argue it's better to do so with a env var than the current solution.
I'm for merging #3863 but I did offer a less disruptive alternative if you'd rather wait. I think it's is a step in the direction I'd like to see. 1 and 2 - I think it's fine to run management commands at build time, such as collectstatic (assuming the target is a local file system). I don't believe we should depend on external resources at build time (nor app startup) except for pypi, npm, and docker registries that are explicitly build time resources. That's the distinction. Further thought 1) compilemessages has lead to some "why does my build not work today" issues seen on internal chat when something is wrong with translations. I'd rather see this done in a CI bot or manually on some schedule. Storing the mo file in git is fine. It's storing a snapshot of the translations at a point in time. Maybe it's not perfectly normalized as it's really a computed value, but it's good enough and the mo files do have unique meaning in that they are known to be working translations. I don't love the usage of rsync (or chmod) that doubles file sizes and slows Docker builds. I think there is a way we could remove this but I would need to consider how to do so without breaking existing desired behavior.
Zero conf set ups are far beyond the scope of "speed up docker builds" but I'd love to discuss more on video chat sometime. |
Description
Building the kpi docker image takes about 14 minutes. It contains references to redis
ERROR:celery.backends.redis:Connection to Redis lost: Retry (4/20) in 1.00 second.
Redis isn't needed to build the docker image. It may be worth reviewing the build process more generally. It should not attempt to make service connections outside of the pypi and apt repos.
Steps to Reproduce
https://gitlab.com/kobo_toolbox/kpi/-/jobs/2500185890
The text was updated successfully, but these errors were encountered: