Skip to content

detect active endpoint trying to remove network and skip with a warning#10555

Merged
milas merged 1 commit intodocker:v2from
ndeloof:network_removal_in_use
May 11, 2023
Merged

detect active endpoint trying to remove network and skip with a warning#10555
milas merged 1 commit intodocker:v2from
ndeloof:network_removal_in_use

Conversation

@ndeloof
Copy link
Copy Markdown
Contributor

@ndeloof ndeloof commented May 11, 2023

What I did
Running compose down with a partial project, attempt to remove network fails with error while removing network: network xxx has active endpoints. With proposed changes, compose list active endpoints and skip network removal with a warning. down command then complete successfully.

$ docker compose down
[+] Running 2/1
 ✔ Container truc-server-1  Removed                                                     0.4s 
 ! Network truc_default     Resource is still in use                                    0.0s 

see #10295

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2023

Codecov Report

Patch coverage: 25.00% and project coverage change: +0.01 🎉

Comparison is base (b776826) 59.66% compared to head (0a03604) 59.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10555      +/-   ##
==========================================
+ Coverage   59.66%   59.67%   +0.01%     
==========================================
  Files         107      107              
  Lines        9324     9337      +13     
==========================================
+ Hits         5563     5572       +9     
- Misses       3190     3192       +2     
- Partials      571      573       +2     
Impacted Files Coverage Δ
pkg/compose/down.go 66.08% <25.00%> (-3.04%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ndeloof ndeloof force-pushed the network_removal_in_use branch from 3862db0 to 4173af7 Compare May 11, 2023 08:34
@ndeloof ndeloof requested review from a team, StefanScherer, glours, laurazard, milas, nicksieger and ulyssessouza and removed request for a team May 11, 2023 08:34
@ndeloof ndeloof force-pushed the network_removal_in_use branch from 4173af7 to b33f53a Compare May 11, 2023 10:00
@ndeloof ndeloof force-pushed the network_removal_in_use branch from b33f53a to 0a03604 Compare May 11, 2023 10:00
@milas milas merged commit bceb3c1 into docker:v2 May 11, 2023
@ndeloof ndeloof deleted the network_removal_in_use branch December 20, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants