baruch / rethink-miner

A data mining helper for rethinkdb, collect your queries and keep them for reuse
22 stars 4 forks source link

Adapt to rethinkdb 2.x #56

Open baruch opened 10 years ago

baruch commented 10 years ago

Some API changes were made and now groupBy is gone and was replaced by group and the like. Need to found these problems and fix them.

marshall007 commented 9 years ago

@baruch is this still being maintained? Any chance on 2.x support soon?

baruch commented 9 years ago

I haven't done anything on rethink-miner for a while now. Besides some coworkers I didn't even hear of anyone else using it or reporting issues so far so had little enthusiasm to work on it beyond what I needed at any point in time.

If you want to contribute even by just reporting issues as you see them I'll probably be happy to resolve the issues and make improvements where necessary. I'm using the tool at work but there I have a lot less variability and so only change what bothers me directly.

baruch commented 9 years ago

Looks like quite a bit needs to change, reql-then that I used is no longer maintained and I'll need to switch to rethinkdbdash and there are a few other libraries that may require updates. The application doesn't start and the stacktraces are not very helpful to figure out what is happening so it may take longer than expected to work it out.

baruch commented 9 years ago

I pushed some changes to branch rethink-2.x this still doesn't work due to rethinkdbdash api changes compared to reql-then.

Link: https://github.com/baruch/rethink-miner/tree/rethink-2.x

baruch commented 9 years ago

Ok. Another push to that branch and it seems to work. I'd appreciate your help by testing the branch before I merge it.

marshall007 commented 9 years ago

@baruch been playing around with it a bit this morning. The only thing I couldn't get to work is the "distinct" table view. It returns:

TypeError: undefined is not a function
    at Object.Query.headers (/Users/marshall/Projects/rethink-miner/lib/query.js:17:10)
    at Object.Query.distincts (/Users/marshall/Projects/rethink-miner/lib/query.js:33:14)
    at /Users/marshall/Projects/rethink-miner/routes/index.js:255:20
    at tryCatcher (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/util.js:24:31)
    at Promise._settlePromiseFromHandler (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/promise.js:454:31)
    at Promise._settlePromiseAt (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/promise.js:530:18)
    at Promise._settlePromiseAtPostResolution (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/promise.js:224:10)
    at Async._drainQueue (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/async.js:187:12)
    at Async._drainQueues (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/async.js:192:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/marshall/Projects/rethink-miner/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)
marshall007 commented 9 years ago

Also, the manage queries endpoint seems to require authentication, but I don't see any documentation on how the credentials get set and/or what the default is.

baruch commented 9 years ago

@marshall007 the default password is "admin" and it is set by the environment variable "ADMIN_PW". This is more safeguard than actual security...

I'll take a look at the distinct option. Maybe I should start writing tests to simplify such transitions.