Skip to content

fix: clean up Docker resources after executing commands in Breeze#62992

Merged
potiuk merged 1 commit intoapache:mainfrom
stegololz:fix-breeze-run-network-leak
Mar 6, 2026
Merged

fix: clean up Docker resources after executing commands in Breeze#62992
potiuk merged 1 commit intoapache:mainfrom
stegololz:fix-breeze-run-network-leak

Conversation

@stegololz
Copy link
Contributor

Fix breeze run leaking a Docker network on every invocation

Each breeze run creates a unique compose project (breeze-run-<uuid>) but never tears it down afterward. The --rm flag on docker compose run removes the container but not the network.

Over time, stale networks accumulate and Docker's IPAM exhausts its default address pool. In my case, it ended with docker Docker allocate an ip identical to my wifi router's IP. This created a bridge interface that captured traffic meant for the real gateway, silently breaking all my IPv4 connectivity.

My implementation wrap the command execution in try/finally and call bring_compose_project_down + remove_docker_networks, matching the existing pattern in testing_commands.py.


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

Generated-by: Claude Code (Claude Opus 4.6) following the guidelines

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE!

@potiuk potiuk merged commit 27c11d0 into apache:main Mar 6, 2026
132 checks passed
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Backport failed to create: v3-1-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 27c11d0 v3-1-test

This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

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

Labels

area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants