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

bblfshctl driver install fails for installed drivers #195

Closed
carlosms opened this issue Oct 1, 2018 · 2 comments
Closed

bblfshctl driver install fails for installed drivers #195

carlosms opened this issue Oct 1, 2018 · 2 comments

Comments

@carlosms
Copy link

carlosms commented Oct 1, 2018

With v2.8.0, a driver install for an already installed driver exits with 1, which is a breaking change that breaks CI for gitbase-web.
The output also seems to be off (contains %s, and prints the usage help):

$ docker exec -it bblfshd bblfshctl driver install go docker://bblfsh/go-driver:latest
Installing go language driver from "docker://bblfsh/go-driver:latest"... Error
Error, driver already installed: go (image reference: docker://bblfsh/go-driver:latest): %s
[driver already installed: go (image reference: docker://bblfsh/go-driver:latest): %s]

Usage:
  bblfshctl [OPTIONS] driver install [install-OPTIONS] [language] [image]

Installs a new driver for a given language

Using `--all` all the official bblfsh driver are install in the
daemon. Using `--recommended` will only install the recommended,
more developed. Using `language` and `image` positional arguments
one single driver can be installed or updated.

Image reference format should be `[transport]name[:tag]`.
Defaults are 'docker://' for transport and 'latest' for tag.

Help Options:
  -h, --help              Show this help message

[install command options]
          --update        replace the current image for the language if any
          --all           installs all the official drivers
          --recommended   install the recommended official drivers
          --ctl-endpoint= control server network type (default: unix)
          --ctl-address=  control server address to connect (default:
                          /var/run/bblfshctl.sock)

[install command arguments]
  language:               language supported by the driver (optional)
  image:                  driver's image reference

Build information
  commit: v2.8.0
  date: 2018-09-27T18:07:48+0000
@dennwc
Copy link
Member

dennwc commented Oct 1, 2018

First of all, please don't use latest - it's expected to break in one way or another. Pin a specific stable version.

Second, why you need to install the driver twice in CI? Just wondering.

Also, this problem was already reported in #166 and contains a description why we can't make it a warning in all cases. The change in v2.8.0 only (correctly) surfaced this error.

I will close it now as a duplicate of #166, but the issues will be resolved in one way or another.

@carlosms
Copy link
Author

carlosms commented Oct 3, 2018

Isn't latest the latest stable version?

We've encountered this error here (and in other projects with similar travis config):
https://github.com/src-d/lookout/blob/master/.travis.yml#L37

We just had the install in place so it would either do the install for an empty travis cache, or silently fail if the driver was installed. I guess we will just add something like || true to the driver install.

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

No branches or pull requests

2 participants