Describe the Bug
Two related issues with our Docker-based dev workflow:
-
make up doesn't run the latest backend - it just starts the already-built container. If requirements.txt has changed (e.g., a new package was added), the running container still uses the stale image with old dependencies. You have to manually remember to run make build first, which is easy to forget and leads to confusing runtime errors.
-
make fireform is significantly slow when requirements.txt changes every time a dependency is added or removed, the entire pip install layer in the Dockerfile is invalidated and all packages are re-downloaded and re-installed from scratch. This takes a long time and isn't generally expected for adding a single package.
Steps to Reproduce
Issue 1: make up ignores new packages
- Add a new package to
requirements.txt
- Run
make up
- Try to import the new package in the app fails with
ModuleNotFoundError
- Only works after manually running
make build then make up
Issue 2: Slow rebuilds
- Run
make fireform to get a working setup
- Add one small package to
requirements.txt
- Run
make fireform again
- Observe that
pip install re-installs all packages from scratch, not just the new one
- This is especially painful when switching branches to test other PRs or your own work each branch may have slightly different dependencies and every switch triggers a full reinstall
Expected Behavior
make up should always run the latest version of the backend, including any newly added packages.
- Rebuilds after a small change to
requirements.txt should be fast (seconds, not minutes). Adding one package shouldn't force reinstallation of all existing packages.
Impact
This significantly slows down the development loop, especially for:
- Reviewing and testing other contributors' PRs that add new dependencies
- Switching between your own feature branches
- Onboarding new contributors who hit stale-container issues
Optimising this would improve the team's productivity across the board.
Possible Fix
We should revisit how the Docker image is built and how make up interacts with it. Some ideas:
- Add a caching strategy for pip installs in the Dockerfile (e.g., BuildKit cache mounts)
- Consider faster package installers that handle cached/incremental installs better
- Make
make up aware of dependency changes so it rebuilds when needed
- Possibly sync dependencies at container startup so new packages are picked up without a full image rebuild
Describe the Bug
Two related issues with our Docker-based dev workflow:
make updoesn't run the latest backend - it just starts the already-built container. Ifrequirements.txthas changed (e.g., a new package was added), the running container still uses the stale image with old dependencies. You have to manually remember to runmake buildfirst, which is easy to forget and leads to confusing runtime errors.make fireformis significantly slow whenrequirements.txtchanges every time a dependency is added or removed, the entirepip installlayer in the Dockerfile is invalidated and all packages are re-downloaded and re-installed from scratch. This takes a long time and isn't generally expected for adding a single package.Steps to Reproduce
Issue 1:
make upignores new packagesrequirements.txtmake upModuleNotFoundErrormake buildthenmake upIssue 2: Slow rebuilds
make fireformto get a working setuprequirements.txtmake fireformagainpip installre-installs all packages from scratch, not just the new oneExpected Behavior
make upshould always run the latest version of the backend, including any newly added packages.requirements.txtshould be fast (seconds, not minutes). Adding one package shouldn't force reinstallation of all existing packages.Impact
This significantly slows down the development loop, especially for:
Optimising this would improve the team's productivity across the board.
Possible Fix
We should revisit how the Docker image is built and how
make upinteracts with it. Some ideas:make upaware of dependency changes so it rebuilds when needed