Merge Request Template
What
Dependencies within dev containers are now isolated. Hence, it doesn't break dependencies installed on the host or vice versa. Additionally, this also fixes the issues with the dev container where sometimes, even when dependencies were installed during the built step, they won't show up when running until setup is rerun.
Why
Addressing #155 (closed) & #162 (closed)
How
- Provide a brief overview of how the changes were implemented (e.g., technologies used, main components affected).
Testing
Sandbox Hosting [auto-managed section, do not edit manually]
- Frontend: http://95.216.218.214:56477
- Backend: http://95.216.218.214:35165
Developer Testing Instructions
-
Setup Instructions:
- Setup whitebox locally.
- Checkout to branch:
feature/whitebox-155 - Build & Run dev container:
docker compose -f compose.dev.yml up --build -d
-
Testing Steps:
- Dev containers should just work.
- Install backend and frontend dependencies locally.
- Run Backend and frontend locally & within containers (to run backend locally, you would have to assign it a new port as 8000 will be occupied by the backend dev container. Tests and everything should work just fine.)
- Test Backend and frontend locally & within containers.
Anything Else?
Running make setup in the endpoint script for the backend would be necessary because while installing dependencies, Poetry installs the project itself. This helps Django find the tests module, which contains our tests. Since the code base is not copied over during the build, the project itself can only be installed this way. It's very quick as the build step does almost everything, so the end developer would not face any friction.
Running make setup in the endpoint script for the frontend is optional. Everything works just fine without it, but I think we should still run it anyway, as it doesn't take much time, but it ensures everything is in place.
Regarding cache usage. The only way to disable cache usage completely is to add no-cache option to backend and frontend services:
services:
backend-dev:
build:
context: .
no_cache: true
However, this didn't solve the issue either. The dependencies would still be flaky and sometimes not show up.
Before Merge Checklist
-
Pass 2 code reviews (get two 👍 and no outstanding comment) -
Bump the version.