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

support querying the server for installed drivers and supported drivers #28

Closed
smola opened this issue Jun 14, 2017 · 7 comments
Closed

Comments

@smola
Copy link
Member

smola commented Jun 14, 2017

Clients should be able to query the server for installed drivers, as well as supported drivers (maybe through some metadata file published officially).

@vmarkovtsev
Copy link
Contributor

One of the possible implementations is to query a fake file for every language (the list can be taken from src-d/enry or github/linguist), record failures and build the registry. Can take some time if implemented straightforward; I bet there is a docker API to check the existence of a container very fast.

@vmarkovtsev
Copy link
Contributor

As for now, hardcode! 😆 https://github.com/src-d/ast2vec/blob/master/ast2vec/repo2nbow.py#L51

@smola
Copy link
Member Author

smola commented Jun 15, 2017

We should also expose which version of the driver is installed.

@vmarkovtsev
Copy link
Contributor

Any updates?

@abeaumont
Copy link
Contributor

No updates, it's something we want to do at some point, but are focused on other tasks at the moment.

@abeaumont
Copy link
Contributor

The listing of supported drivers may be tricky, since the server may support custom images for some languages, and building a list of images through a complete list of languages and filtering sounds rather innefficient.
A hardcoded (but configurable) list of supported drivers, as suggested by @smola, is probably more efficient. In this case, it should probably be related with #80.

In any case, we can start adding support for installed drivers, to begin with.

@abeaumont
Copy link
Contributor

As discussed with @mcuadros, we will add support both for server version and installed drivers, in the following way:

  • The server will offer 3 new request types:
    • version. The response will provide server version information, which may include the commit hash and/or a tag.
    • get_driver. The request will include the language name. The response will provide the manifest of the driver, which the server will retrieve from the file-system.
    • get_drivers. The response will provide a list of installed drivers, with its language, version and image_id

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