Skip to content

Compose: Improve error messages when resource create/update fails - #145

Merged
aaronlehmann merged 2 commits into
docker:masterfrom
dnephin:improve-compose-secrets-errors
Jun 7, 2017
Merged

Compose: Improve error messages when resource create/update fails#145
aaronlehmann merged 2 commits into
docker:masterfrom
dnephin:improve-compose-secrets-errors

Conversation

@dnephin

@dnephindnephin commented Jun 1, 2017

Copy link
Copy Markdown
Contributor

Previously secret update errors looked like this:

Error response from daemon: rpc error: code = 3 desc = only updates to Labels are allowed

which do not provide enough details for a user to understand what failed.

Also removes some unnecessary conditions in deployServices()

Signed-off-by: Daniel Nephin <dnephin@docker.com>

@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 👼

@codecov-io

codecov-io commented Jun 1, 2017

Copy link
Copy Markdown

Codecov Report

Merging #145 into master will decrease coverage by 0.04%.
The diff coverage is 63.04%.

@@ Coverage Diff @@## master #145 +/- ##
==========================================
- Coverage 44.96% 44.91% -0.05% 
==========================================
Files 169 169 Lines 11381 11367 -14 ==========================================
- Hits 5117 5106 -11 + Misses 5971 5968 -3 
Partials 293 293

Signed-off-by: Daniel Nephin <dnephin@docker.com>
@dnephin

Copy link
Copy Markdown
ContributorAuthor

Added another commit which uses a map instead of a switch/case for the compose loader transform

@dnephindnephin modified the milestone: 17.06.0Jun 5, 2017
@dnephin
dnephin requested a review from aaronlehmannJune 7, 2017 15:35
@aaronlehmann

Copy link
Copy Markdown

The changes to error messages LGTM. Are the rest of the changes unrelated cleanups?

@dnephin

Copy link
Copy Markdown
ContributorAuthor

Yes

@aaronlehmann

Copy link
Copy Markdown

LGTM

@aaronlehmann
aaronlehmann merged commit 9d12d6f into docker:masterJun 7, 2017
@GordonTheTurtleGordonTheTurtle added this to the 17.06.0 milestone Jun 7, 2017
@dnephin
dnephin deleted the improve-compose-secrets-errors branch June 7, 2017 15:52
@thaJeztahthaJeztah modified the milestones: 17.06.0, 17.07.0Jul 17, 2018
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@aaronlehmann@vdemeester@thaJeztah@GordonTheTurtle