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

Graceful report for non-existing image #213

Merged
merged 9 commits into from
Nov 27, 2018
Merged

Conversation

bzz
Copy link
Contributor

@bzz bzz commented Nov 20, 2018

Similar to AlreadyInstalled status from d5b686f this change propagates the fact that image request is not found or needs to have authentication credentials though gRPC Unauthenticated code on the driver install command.

Before:

$ bblfshctl driver install list12223
Installing driver from "list12223"... rpc error: code = Unknown desc = errors:
denied: requested access to the resource is denied
unauthorized: authentication required

After:

$ bblfshctl driver install list12223
Installing driver from "list12223"... driver does not exist or is private

It resolves #207 in a way it's been decided in that issue.

While at it, few other small fixes included:

  • latest dep ensure
  • bblfshctl -ctl-endpoint -> bblfshctl -ctl-network for consistency, same as it is in bblfshd
  • tiny err msg cleanup

cmd/bblfshctl/cmd/driver_install.go Outdated Show resolved Hide resolved
daemon/daemon_test.go Show resolved Hide resolved
daemon/protocol/service.go Outdated Show resolved Hide resolved
@bzz
Copy link
Contributor Author

bzz commented Nov 22, 2018

All feedback addressed, tests added, error code analysis introduced instead of strings.

Ready for another round @creachadair @dennwc

Copy link
Member

@dennwc dennwc left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for implementing it :)

@creachadair Do you have any other feedback? If not, I'll merge it.

daemon/errors.go Outdated Show resolved Hide resolved
bzz and others added 9 commits November 27, 2018 10:07
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
On the clinet `bblfsctl` report if driver is missing for bblfsh org

TEST PLAN:
 - $ go test
 - $ bblfshcrl driver install list -> `driver 'docker://list' does not exist`

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Co-Authored-By: bzz <bzz@users.noreply.github.com>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
@bzz
Copy link
Contributor Author

bzz commented Nov 27, 2018

All feedback addressed, going to merge as soon as CI is green.

@bzz bzz merged commit 07f2efc into bblfsh:master Nov 27, 2018
@bzz bzz deleted the driver/install branch November 27, 2018 09:30
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.

Trying to install a non-existent driver gives authorization error
4 participants