Skip to content

Add storage driver context - #1070

Closed
amitshukla wants to merge 2 commits into
distribution:masterfrom
amitshukla:working-664
Closed

amitshukla wants to merge 2 commits into
distribution:masterfrom
amitshukla:working-664

Conversation

@amitshukla

Copy link
Copy Markdown
Contributor

Errors thrown by storage drivers don't have the name of the driver, causing user confusion about whether the error is coming from Docker or from a storage driver. This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes whenever ErrUnsupportedDriver is used.
The tests check whether the driver name appears in the error message.

Closes: #664

Signed-off-by: Amit Shukla [email protected]

@GordonTheTurtle

Copy link
Copy Markdown

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "working-664" [email protected]:amitshukla/distribution.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

Errors thrown by storage drivers don't have the name of the driver, causing user confusion about whether the error is coming from Docker or from a storage driver. This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes whenever ErrUnsupportedDriver is used.
The tests check whether the driver name appears in the error message.

Signed-off-by: Amit Shukla [email protected]
@RichardScothern RichardScothern changed the title Fix for issue 664: https://github.com/docker/distribution/issues/664 Add storage driver context Oct 6, 2015
@RichardScothern

Copy link
Copy Markdown

You will need to sign the commit correctly (you are missing < and > around your email address)

…ausing user confusion about whether the error is coming from Docker or from a storage driver. This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes whenever ErrUnsupportedDriver is used.
The tests check whether the driver name appears in the error message.

Signed-off-by: Amit Shukla <[email protected]>
@amitshukla

Copy link
Copy Markdown
Contributor Author

@RichardScothern done - thanks

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Was this change necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed ErrUnsupportedMethod from var to type. This meant switch on err doesn't work any more.

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.

@amitshukla That is untrue. You just need to use a type switch. :)

@dmp42

dmp42 commented Oct 19, 2015

Copy link
Copy Markdown
Contributor

@amitshukla heads-up! release is near :)

@dmp42 dmp42 added this to the Registry/2.2 milestone Oct 19, 2015

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.

No reason to use pointer type for this struct.

@RichardScothern

Copy link
Copy Markdown

ping @amitshukla

@RichardScothern

Copy link
Copy Markdown

carried in #1150

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.

5 participants