Skip to content

Fix breeze down ignoring the --cleanup-build-cache flag - #73964

Open
Andrushika wants to merge 5 commits into
apache:mainfrom
Andrushika:Andrushika/volume-turn-off-status
Open

Andrushika wants to merge 5 commits into
apache:mainfrom
Andrushika:Andrushika/volume-turn-off-status

Conversation

@Andrushika

@Andrushika Andrushika commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Why

Breeze mounts a compose volume on /root/.cache of the airflow container. It holds the uv, pip and node caches. #48740 added it, together with breeze down --cleanup-build-cache and a step in breeze doctor to remove it. The docs say that down does not delete build caches unless an explicit cache-cleanup flag is passed.

The code does the opposite:

  • The flag and breeze doctor run docker volume rm --force airflow-cache-volume. Docker Compose prefixes the volume with the project name, so the real volume is for example breeze_airflow-cache-volume. No volume has the bare name, and --force hides the miss. Both lines are unchanged since Improve caching strategy for docker breeze runs #48740.
  • A plain breeze down removes all volumes of the project, so it removes the cache every time.

So on main breeze down deletes the cache, and breeze down -p -b keeps it.

What

breeze down now recognises the volume by its com.docker.compose.volume label and keeps it unless --cleanup-build-cache is passed. The flag also works together with --preserve-volumes. breeze doctor removes the volume after its confirmation. The cache of a deleted worktree is still removed without the flag.

This changes what a plain breeze down removes. Each project keeps about 100 MB after it, because the image already ships 98 MB in /root/.cache. Happy to keep only the flag fix if that is not wanted.

related: #48740, #73836.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5.1)

Generated-by: Claude Code (Fable 5.1) following the guidelines

breeze down --cleanup-build-cache and breeze doctor removed a volume
named airflow-cache-volume, but compose prefixes the volume with the
project name, so neither ever removed anything. A plain breeze down
removed the volume every time instead, although the docs say build
caches are only deleted with an explicit cache-cleanup flag.
Comment thread dev/breeze/src/airflow_breeze/commands/developer_commands.py Outdated
Comment thread dev/breeze/src/airflow_breeze/commands/developer_commands.py Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants