hubotio / hubot-redis-brain

A hubot script to persist hubot's brain using redis
69 stars 55 forks source link

properly set auth token and no_ready_check for heroku redistogo #4

Closed 100ideas closed 9 years ago

100ideas commented 9 years ago

https://github.com/hubot-scripts/hubot-redis-brain/issues/3

not sure if no_ready_check: true is really necessary - thoughts?

technicalpickles commented 9 years ago

not sure if no_ready_check: true is really necessary - thoughts?

I'm not familiar with it. Is that something you needed to do for things to work, or just something you tend to use for the redis client?

technicalpickles commented 9 years ago

not sure if no_ready_check: true is really necessary

https://github.com/mranney/node_redis#connect for reference

technicalpickles commented 9 years ago

I'm looking a bit more closely, and I'm having a hard time determine what the change is that fixes passes the auth. The only functional change (ie not the logging changes) I see is using no_ready_check when auth is set.

100ideas commented 9 years ago

It's cryptic because in this example the authentication details are stored in an environment variable, like

REDISTOGO_URL=redis://redistogo:111111111111111111@sub.redistogo.com:10000

Redis.createClient(info.port, info.hostname) will throw an error if REDISTOGO_URL happens to contain authentication parameters unless (apparently?) it is also passed {no_ready_check: true}.

Adding the check let's me connect directly to a redistogo instance on heroku running along the free hubot web process.

Details: https://github.com/hubot-scripts/hubot-redis-brain/issues/4

technicalpickles commented 9 years ago

Sorry for the delay on this.

Since you've taken the time to help on https://github.com/hubot-scripts/hubot-redis-brain/issues/3 and prepare a fix, I've added you as a collaborator. I'd suggest still using PRs, and following semantic version. You can release with grunt release:<patch|minor|major>.

technicalpickles commented 9 years ago

Oh, and let me know your npm login (or create) one so I can add you there for releasing.