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
Use docker-compose to run crates.io inside Travis #1814
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This is the first step towards #868. Right now this new "Integration Tests" task is really slow, but there are a few things that would make the task faster. 1. Move more build tasks into Docker Currently the existing Travis CI tasks download all of dependencies, but the new task also downloads them again inside a container. Moving all of them inside the container would allow us to cache the artifacts between the tasks. 2. Have intermediate Docker images on a repository The Rust team apparently have some Docker images under https://hub.docker.com/u/rustops already. We can have crates.io's images on the repository to cache intermediate artifacts. 3. Use Docker in Production! Okay. This might be too far. But Heroku supports Docker. Using Docker in Heroku would make reproducing Heroku's environment straightforward for developers. In other words, we can achieve production-development parity. Heroku's Docker environment is a bit weird. The What do you think? |
The point I don't understand here is why we need docker-compose on Travis for end-to-end tests. We could also run both the frontend and the backend directly in the Travis container, without the additional level of containers. (I'm not disagreeing with you, just curious how you got to this design.) |
Good point. We can! The biggest reason I choose docker-compose here is that we already have We also have a completely different set of configuration files (Procfile and buildpacks) for the production environment. So, for me, the options were; Reusing Procfile and buildpacks Pros:
Cons:
Reusing docker-compose.yml Pros:
Cons:
Write a small shell script to run Pros:
Cons:
|
@kzys Thanks for the additional explanation. I doubt it is feasible to make the production, test and development environments much more similar. In production we don't "run" the frontend – it's just a bunch of compiled static files, so I've got no idea what the "frontend" container would be supposed to be doing in production. In the development environment, we want to run the Ember test server, to detect changes and automatically recompile the JavaScript files. The test environment will have yet slightly different requirements. I'd personally tend to avoid the complexities of using Docker containers for the tests, and certainly in production, since I don't see enough advantages, but I don't really know enough about our deployment for my opinion to bear much weight. |
I agree with @smarnach here:
It looks like you're working on an alternative PR, so I'm going to close this in favor of that one |
I'm not sure there's much reason to keep this open, given the consensus from two team members we don't want to go in this direction |
No description provided.