Skip to content

Fix some problems with image force remove - #187

Merged
vdemeester merged 1 commit into
docker:masterfrom
dnephin:small-cleanup-to-image-remove
Jun 14, 2017
Merged

Fix some problems with image force remove#187
vdemeester merged 1 commit into
docker:masterfrom
dnephin:small-cleanup-to-image-remove

Conversation

@dnephin

Copy link
Copy Markdown
Contributor

Sorry, I didn't notice these until #160 was merged.

  • the warning should go to stderr
  • the warning message should not say "NotFound". The err could be anything, "not found" is just one option (also camel case for user errors is not great)
  • fix the code so that opts.force doesn't have to be checked twice.

@thaJeztah@vdemeester

@vdemeestervdemeester left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🐸 🤗

Signed-off-by: Daniel Nephin <dnephin@docker.com>
@dnephin
dnephinforce-pushed the small-cleanup-to-image-remove branch from ce947e8 to 676b71eCompareJune 13, 2017 19:16
@codecov-io

codecov-io commented Jun 13, 2017

Copy link
Copy Markdown

Codecov Report

Merging #187 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@ Coverage Diff @@## master #187 +/- ##
==========================================
- Coverage 45.34% 45.33% -0.01% 
==========================================
Files 171 171 Lines 11482 11483 +1 ==========================================
Hits 5206 5206 - Misses 5979 5980 +1 
Partials 297 297

@thaJeztah

Copy link
Copy Markdown
Member

the warning should go to stderr

I assumed this was part of the fix; e.g., we recently had a PR in engine that changed a warning from stderr to stdout moby/moby#29209

@dnephin

Copy link
Copy Markdown
ContributorAuthor

I don't think that's right. Both this warning and the one you referenced should go to stderr. If the desire was to hide a warning we should add a flag or environment variable to disable it. I don't think moving a warning to stdout because powershell treats stderr as an error is the right solution. stdout should only be for "normal program output".

If I were scripting a docker image rm -f | awk ... | xargs echo "Removed ids: " then sending a warning to stdout would break my script.

@aaronlehmann

Copy link
Copy Markdown

LGTM

@vdemeester
vdemeester merged commit d209929 into docker:masterJun 14, 2017
@GordonTheTurtleGordonTheTurtle added this to the 17.07.0 milestone Jun 14, 2017
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Jun 30, 2020
full diff: mitchellh/mapstructure@v1.0.0...v1.3.2
v1.3.2
- Decode into interface type with a struct value is supported [dockerGH-187]
v1.3.1
- Squash should only squash embedded structs. [dockerGH-194]
v1.3.0
- Added `",omitempty"` support. This will ignore zero values in the source
structure when encoding. [dockerGH-145]
v1.2.3
- Fix duplicate entries in Keys list with pointer values. [dockerGH-185]
v1.2.2
- Do not add unsettable (unexported) values to the unused metadata key
or "remain" value. [dockerGH-150]
v1.2.1
- Go modules checksum mismatch fix
v1.2.0
- Added support to capture unused values in a field using the `",remain"` value
in the mapstructure tag. There is an example to showcase usage.
- Added `DecoderConfig` option to always squash embedded structs
- `json.Number` can decode into `uint` types
- Empty slices are preserved and not replaced with nil slices
- Fix panic that can occur in when decoding a map into a nil slice of structs
- Improved package documentation for godoc
v1.1.2
- Fix error when decode hook decodes interface implementation into interface
type. [dockerGH-140]
v1.1.1
- Fix panic that can happen in `decodePtr`
v1.1.0
- Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [dockerGH-133]
- Support struct to struct decoding [dockerGH-137]
- If source map value is nil, then destination map value is nil (instead of empty)
- If source slice value is nil, then destination slice value is nil (instead of empty)
- If source pointer is nil, then destination pointer is set to nil (instead of
allocated zero value of type)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/cli that referenced this pull request Jun 30, 2020
full diff: mitchellh/mapstructure@v1.0.0...v1.3.2
v1.3.2
- Decode into interface type with a struct value is supported dockerGH-187
v1.3.1
- Squash should only squash embedded structs. dockerGH-194
v1.3.0
- Added `",omitempty"` support. This will ignore zero values in the source
structure when encoding. dockerGH-145
v1.2.3
- Fix duplicate entries in Keys list with pointer values. dockerGH-185
v1.2.2
- Do not add unsettable (unexported) values to the unused metadata key
or "remain" value. dockerGH-150
v1.2.1
- Go modules checksum mismatch fix
v1.2.0
- Added support to capture unused values in a field using the `",remain"` value
in the mapstructure tag. There is an example to showcase usage.
- Added `DecoderConfig` option to always squash embedded structs
- `json.Number` can decode into `uint` types
- Empty slices are preserved and not replaced with nil slices
- Fix panic that can occur in when decoding a map into a nil slice of structs
- Improved package documentation for godoc
v1.1.2
- Fix error when decode hook decodes interface implementation into interface
type. dockerGH-140
v1.1.1
- Fix panic that can happen in `decodePtr`
v1.1.0
- Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` dockerGH-133
- Support struct to struct decoding dockerGH-137
- If source map value is nil, then destination map value is nil (instead of empty)
- If source slice value is nil, then destination slice value is nil (instead of empty)
- If source pointer is nil, then destination pointer is set to nil (instead of
allocated zero value of type)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
nobiit pushed a commit to nobidev/docker-cli that referenced this pull request Nov 19, 2025
Sign up for freeto 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.

6 participants

@dnephin@codecov-io@thaJeztah@aaronlehmann@vdemeester@GordonTheTurtle