Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jun 7, 2017

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Jun 1, 2017

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>
Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 👼

@codecov-io
Copy link

codecov-io commented Jun 1, 2017

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
Contributor Author

dnephin commented Jun 1, 2017

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

@dnephin dnephin modified the milestone: 17.06.0 Jun 5, 2017
@dnephin dnephin requested a review from aaronlehmann June 7, 2017 15:35
@aaronlehmann
Copy link
Contributor

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

@dnephin
Copy link
Contributor Author

dnephin commented Jun 7, 2017

Yes

@aaronlehmann
Copy link
Contributor

LGTM

@aaronlehmann aaronlehmann merged commit 9d12d6f into docker:master Jun 7, 2017
@GordonTheTurtle GordonTheTurtle 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
@thaJeztah thaJeztah modified the milestones: 17.06.0, 17.07.0 Jul 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>
Sign up for free to 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