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

add some function to adjust juju/error #11

Merged
merged 2 commits into from
Oct 24, 2018

Conversation

WangXiangUSTC
Copy link

IsNotFound
NotValidf
IsAlreadyExists
AlreadyExistsf

@WangXiangUSTC
Copy link
Author

@gregwebs PTAL

@gregwebs gregwebs requested a review from lysu October 23, 2018 12:13
@gregwebs
Copy link

This is good from a compatibility perspective. However, I would like to move towards using the pkg/errors API and removing the need for the juju adapater if possible. That includes using structured errors rather than string matching.

pkg/errors has a function that can be used to find a structured error type rather than just string matching.

errcode uses this and formalizes error types as error codes.

So I am also wondering which projects need this and if they can start to consider using proper error types.

But we can also merge this now and put off refactoring until later.

@WangXiangUSTC
Copy link
Author

I agree with you, this is just a temporary solution, because I need use these function now, it is a little emergency, we can merge this now, and refine it later. @gregwebs

@gregwebs
Copy link

I think we should make the juju adapter be a separate package.

@WangXiangUSTC
Copy link
Author

@gregwebs please merge this pr, I am not authorized to do this, thanks!

@lysu
Copy link
Collaborator

lysu commented Oct 24, 2018

LGTM... I don't have permission too

@gregwebs gregwebs merged commit 1176802 into pingcap:master Oct 24, 2018
@gregwebs
Copy link

merged. @lysu that's weird: you merged PRs in the past and I don't think permissions changed. I made you an admin if you want to look at the settings.

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.

3 participants