-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
I didn't want to call this a bug since it doesn't impact functionality, but it's not a feature request and there was no template for enhancement.
For a compose file that uses a non-external volume (the only portion that matters):
services:
foo:
image: nginx:alpine
volumes:
- bar:/bar
volumes:
bar:an up/down yields:
$ docker compose version
Docker Compose version v2.39.1
$ docker compose up -d
[+] Running 3/3
✔ Network bar_default Created 0.0s
✔ Volume "bar_bar" Created <----- 0.0s
✔ Container bar-foo-1 Started
$ docker compose down -v
[+] Running 3/3
✔ Container bar-foo-1 Removed 0.2s
✔ Volume bar_bar Removed 0.0s
✔ Network bar_default RemovedOut of all the creation/started states, the volume is the only one that is quoted. The fact that removal of that same resource is unquoted strongly suggests the discrepancy was not intentional nor a technical requirement.
This isn't a new issue (based on the code), and more likely that nobody has noticed or cared enough to report. (Due to an unrelated bug report I've been paying closer attention to the output and why I've noticed.)
I was going to just create a PR for the one letter fix (s/q/s/):
Line 1626 in 1d69f4a
| eventName := fmt.Sprintf("Volume %q", volume.Name) |
but even with a pristine checkout (without my changes), I get 17 e2e test failures, so decided to err on the side of caution by creating this issue. I'd be happy to create a PR if test failures are 'normal' (and/or help diagnose those failures if they should be passing), but would probably take you longer to respond than to implement the fix yourself...