Skip to content

Move drivers out of the main tree #1740

Closed

Description

@mmalecki

I noticed that all the drivers are kept in the main tree. This is problematic for developers who want to contribute to them or even just check out the source code locally.

I'd be happy to help with moving the node driver out of the tree.

Activity

  1. mlucy commented on Dec 5, 2013

    @mlucy
    Member

    Hi @mmalecki,

    We've talked about this before, and decided to leave the drivers in the main tree for the time being. It makes life much easier for the server team, because:

    • When they add a new term or new functionality, they can add that term to the drivers and/or write tests for that functionality without getting multiple repositories involved.
    • They can run the driver-dependent tests without getting multiple repositories involved.
    • They know that they always have the right client for the version of the server they've checked out.
      • This is really important when git bisecting across protocol changes.

    The JS driver in particular is also used for the Web UI, so keeping them synced in the same repository is very important.

    We may re-visit this decision once the pace of ReQL development slows.

    Is there anything we can do to make working with the drivers in the main RethinkDB repository more pleasant? Is the primary obstacle the size of the git clone?

  2. mglukhovsky commented on Dec 5, 2013

    @mglukhovsky
    Member

    One simple thing we could do (that I've seen other projects do) is place useful README.md files in subdirectories throughout the repository, explaining what code lives in each directory.

    This makes it super-pleasant to browse on GitHub.

  3. dminkovsky commented on Jul 18, 2014

    @dminkovsky

    The fact that the 3 supported drivers are part of the main repo is fantastic.

    I don't know what your internal sentiment is regarding long-term support for these drivers, but if you guys are committed to them, then having them right alongside the main source really speaks mountains about the RethinkDB emphasis on the developer.

    The fact that you have to clone the whole repo to work on the drivers is also fantastic. I've never worked with a C++ codebase before, but I'll tell you this: I won't come any closer to working on a C++ codebase if I don't have one on my computer. Cloning a repo is easy, and it might take a bit more time, but at the end of the day it's trivial to clone a big repo vs. a small repo. When I do get that big repo after a few extra minutes of waiting, I then find myself encouraged to explore the other drivers and the server source. I love that.

  4. mlucy commented on Jul 20, 2014

    @mlucy
    Member

    @dminkovsky -- ^.^

    I'm glad you like the arrangement. I think the three main drivers are going to be part of the main repo for a long time yet. ReQL development hasn't slowed down at all, despite what we thought a year ago, so it's still really important for our dev process that they be in the same repo as the server.

  5. knownasilya commented on Jan 8, 2015

    @knownasilya

    Would love them moved out as well, makes it that much easier to contribute, and find the code. This has a lot to do with productivity, commit history, issues, PRs, etc. It's all merged together and that's a HUGE pain! Like I was just looking through the commit history, trying to find where Promise support was added to the Javascript driver, and I couldn't find anything.. almost 30k commits.

    Also having dedicated contributors just for that driver.

  6. deontologician commented on Jan 8, 2015

    @deontologician
    Contributor

    @knownasilya If you're looking for changes that only affect a single directory, you can specify it to git log:

    $ git log --name-status --no-merges drivers/javascript
    
  7. AtnNn commented on Jan 8, 2015

    @AtnNn
    Member

    For the specific problem of finding commits and tracking changes, you can use the following git commands:

    git blame to find the commit that introduced a change:

    $ git blame -- drivers/javascript/net.coffee | grep -i bluebird
    02b70c7f drivers/javascript/net.coffee     (neumino       2014-03-31 17:18:38 -0700  15) Promise = require('bluebird')
    

    02b70c7 (Add promises to the JS driver) is the commit you are looking for.

    git log to show all changes in a specific subfolder:

    $ git log --graph --oneline --decorate -- drivers/javascript/
    * 4d2fd72 (tag: v1.15.0) Bump driver version numbers to 1.15.0.0
    |  drivers/javascript/package.json |    2 +-
    |  1 file changed, 1 insertion(+), 1 deletion(-)
    * 29ab2e5 (origin/michel_3087_stack_traces_2) Create a stack trace only if Error.captureStackTrace is available
    |  drivers/javascript/errors.coffee |    6 ++++--
    |  1 file changed, 4 insertions(+), 2 deletions(-)
    *   dc0cff0 Merge branch 'michel_3054_backtraces' into v1.15.x
    |\  
    | * 1b48d71 Backtrace should prefix geo terms
    | |  drivers/javascript/ast.coffee |   10 +++++-----
    | |  1 file changed, 5 insertions(+), 5 deletions(-)
    * | 4fb062f Capture stack trace
    | |  drivers/javascript/errors.coffee |    2 ++
    | |  1 file changed, 2 insertions(+)
    * | 23c52ce (origin/gchpaco_2185) Fix ReQL tests to reflect new style for batch operations.
    |/  
    |    drivers/javascript/net.coffee |   16 ++++++++++++++--
    |    1 file changed, 14 insertions(+), 2 deletions(-)
    * b3ca440 (origin/daniel_3011) Introduced polygon_sub term to replace sub() on polygons.
    |  drivers/javascript/ast.coffee |    5 +++++
    |  1 file changed, 5 insertions(+)
    

    git shortlog to find contributors to the driver:

    $ git shortlog -sen drivers/javascript/ | head -n 5
       149  Bill Rowan <[email protected]>
       112  Bill <[email protected]>
        81  neumino <[email protected]>
        63  Etienne Laurin <[email protected]>
        50  Marc Hesse <[email protected]>
    
  8. knownasilya commented on Jan 8, 2015

    @knownasilya

    Those are some nice commands, didn't know you could use git log on a directory.
    I've never had a chance to try out git blame.
    git shortlog looks nice.

    Now this is all nice and well, but once again not everyone knows how to do this, and not everyone has cloned the repo first. Really it comes down to how much you guys want to get others involved, and make on-boarding for contributors easy, which says a lot about a project.

  9. deontologician commented on Jan 8, 2015

    @deontologician
    Contributor

    Maybe we could add some useful commands like this to the READMEs for the drivers. From past experience I can say that splitting up projects that are actually developed in lockstep into multiple repositories and using submodules or subtree merges to keep them in sync is a huge pain.

  10. AtnNn commented on Jan 8, 2015

    @AtnNn
    Member

    @knownasilya, I agree with you. I also believe that splitting out the drivers would encourage making the driver protocol more version-agnostic.

    However #1740 (comment) above explains why this hasn't been done yet.

  11. knownasilya commented on Jan 8, 2015

    @knownasilya

    Is the main reason that ReQL is still changing too fast? Or is it that the web app is also bundled in this repo (should be in it's own repo as well..)?

  12. knownasilya commented on Jan 8, 2015

    @knownasilya

    Maybe we could add some useful commands like this to the READMEs for the drivers.

    Added #3523

  13. danielmewes commented on Jun 8, 2015

    @danielmewes
    Member

    @knownasilya Sorry for the late response: It's a combination of both. At the moment it makes our lives a bit easier because it's easier to keep the server and drivers in sync and to run tests at a given (even non-release) version without having to deal with separate repositories.

  14. joaojeronimo commented on Jun 11, 2015

    @joaojeronimo

    (at least for javascript (actually coffeescript in this case))

    Have you guys heard about npm link ? I think it solves all those problems.

    You can npm link a specific version, the latest version, an older version, whatever, while allowing everyone the privileges of having the driver on it's own directory.

  15. AtnNn commented on Oct 25, 2016

    @AtnNn
    Member

    This issue has come up again. As RethinkDB moves to being a more community-driven project, we want to make it easier to contribute to the drivers, and perhaps have separate maintainers for them.

    I think those considerations outweigh the advantages of a monorepo with tight coupling.

    This process would also blur the line between community drivers and official drivers. Previously, no feature was allowed to be merged unless it was supported in at least one driver, and no release was made until all four official drivers had feature parity.

    The testsuite is also important to consider. Currently, tests for RethinkDB itself and for each official driver are mixed up together in an efficient but monolithic testsuite.

  16. kofalt commented on Oct 25, 2016

    @kofalt

    Driver consistency is a huge plus to using RethinkDB. It would be great if that quality remained, whether via keeping it in a single repository, or some other process (merge criteria? clever CI? etc).

    I'd also worry about driver drift - what happens when (eg) the node community ends up adding a bunch of features that the other communities don't implement or don't agree with?

  17. knownasilya commented on Oct 25, 2016

    @knownasilya

    Or just a unified test suite that can handle all of the drivers, e.g. handle input and output but don't worry about the implementation, by running against each, so once all pass the suite you do a release.

  18. AtnNn commented on Oct 25, 2016

    @AtnNn
    Member

    We already have such tests, called the polyglot tests. They have built-in support for the Ruby, JavaScript and Python drivers. Using conversion scripts, those same tests are also used to test the Java driver and a few other drivers

  19. modified the milestones: open-rethinkdb, backlog on Oct 25, 2016
  20. marshall007 commented on Oct 26, 2016

    @marshall007
    Contributor

    @AtnNn we should also consider tackling #3771 (i.e. adopting rethinkdbdash as the official JS driver) at the same time. I would imagine a trivial amount of work would need to go into updating the polyglot tests to run against rethinkdbdash. Once we start splitting out the repos, that would be an opportune time to do it.

  21. self-assigned this
    on May 15, 2020
  22. modified the milestones: Sprint #1, on May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions