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

Downgrading drivers doesn't yield functional drivers. #184

Open
m09 opened this issue Sep 7, 2018 · 3 comments
Open

Downgrading drivers doesn't yield functional drivers. #184

m09 opened this issue Sep 7, 2018 · 3 comments

Comments

@m09
Copy link

m09 commented Sep 7, 2018

Installing a driver from latest (defaulting to v2) and then downgrading this driver doesn't yield a functioning driver of the downgraded version.

I'll try and provide a simple test case in the following week (or after the retreat) if needed.

@bzz
Copy link
Contributor

bzz commented Feb 7, 2019

From src-d/style-analyzer#552 (comment) by @m09

In my experience it happens when you first install the recommended driver and then install the correct version.

So a reproducible example should look something like

docker rmi bblfsh
docker run -d --name bblfsh --privileged -p 9432:9432 bblfsh/bblfshd
docker exec -it bblfsh bblfshctl driver install --recommended

# check that newer driver version installed and is working
docker exec -it bblfsh bblfshctl driver list
bblfsh-cli -m annotated <path-to.js>

docker exec -it bblfsh bblfshctl driver install python bblfsh/python-driver:v1.2.0 --update

# see the old driver version installed
docker exec -it bblfsh bblfshctl driver list
bblfsh-cli -m annotated <path-to.js>

@m09 would that be correct?

@m09
Copy link
Author

m09 commented Feb 7, 2019

It seems about right to me. I remember having tried other ways such as first using remove and then an install instead of install --upgrade and the result was the same.

BTW in your example you specified python but it might only be buggy with javascript.

@rporres
Copy link

rporres commented Mar 6, 2019

Added to this, the error thrown when you try to install a downgraded driver is misleading for the uninitiated. For example, I was trying to install v1.2.0 in bblfshd:v2.11.7-drivers which returned this message:

root@lookout-work-6b4487fff-ch4bw:/# bblfshctl driver install javascript bblfsh/javascript-driver:v1.2.0
Installing javascript language driver from "bblfsh/javascript-driver:v1.2.0"... driver already installed: javascript (image reference: docker://bblfsh/javascript-driver:v1.2.0)

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
      -f, --force        ignore already installed errors
          --ctl-network= 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.11.7
  date: 2019-02-13T16:22:21+0000

In my noobiness I thought this meant that v1.2.0 was already installed whereas the reality was quite different 😅:

root@lookout-work-6b4487fff-ch4bw:/# bblfshctl driver list javascript | grep javascript
| javascript | docker://bblfsh/javascript-driver:latest | v2.6.0  | beta   | 6 weeks  | alpine | 1.10-alpine | node:8-alpine                |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants