-
Notifications
You must be signed in to change notification settings - Fork 285
Description
Description:
The current implementation of the clean target in the project's Makefile is extremely dangerous. Specifically, the clean_docker target runs docker system prune --volumes.
This command does not just clean Querybook-related resources; it wipes all unused Docker objects on the host machine, including:
- Volumes from other projects (e.g., Minikube, local dev databases).
- Shared networks.
- Build caches for unrelated containers.
In a professional development environment where multiple projects coexist, this behavior is unacceptable and leads to significant data loss and downtime.
Steps to Reproduce:
- Have other Docker projects or a Minikube cluster running (or stopped) with persistent volumes.
- Run
make cleanin the Querybook repository. - Observe that all volumes and resources from other projects are permanently deleted.
Suggested Fix:
The clean target should be scoped strictly to Querybook resources. Instead of a global prune, it should target specific containers, images, and volumes using filters or the project name defined in the docker-compose.yml.
Example of a safer approach:
clean_docker:
docker-compose down -v --rmi local
This ensures only the current project's resources are removed.
Additional Context:
I personally lost a configured Minikube cluster and several other development volumes due to this command. A "clean" command in a repository should never affect the global Docker state of the host.