bblfshd
bblfshd copied to clipboard
Downgrading drivers doesn't yield functional drivers.
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.
From https://github.com/src-d/style-analyzer/issues/552#issuecomment-458881442 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?
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.
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 |