DialURL method. I guess #480 broke this because I started seeing this error after upgrading redigo to 1.8.2: ERR wrong number of arguments for 'auth' command. This is just an assumption but yeah... Will investigate further if I have a bit more time on my hands.Do you have an example url? Reminder please ensure you obscure and user / passwords.
I just looked at the PR again and I can only assume your URL includes a user but you're not using redis 6.0+?
That is correct, Heroku Redis is 5.0.8 afaik.
The fix should be to remove the user part from your URL as it's invalid, so replace:
redis://user:secret@localhost:6379/0?foo=bar&qux=baz
with:
redis://:secret@localhost:6379/0?foo=bar&qux=baz
Hi 馃憢
first of all, thanks for redigo, we use it internally a lot and it helps us a ton! :)
We are aware of this issue, but i believe there is no good way forward for old Redis'. We are currently investigating if we can remove the fake username (h) from the REDIS_URL. I, personally, don't have high hopes for that because it could potentially break a lot assumptions and might not be backwards compatible with older clients.
I believe the only way forward would be to upgrade Redis to 6 if you want to use newer client library versions.
I'll have an eye on this issue because it's affecting us internally as well :)
Cheers,
Ben
Heroku Data Engineer
Hi, I think I have an approach that will be forward and backward-compatible.
Assumptions:
AUTH command.AUTH in modern (6.0) Redis, the special user default is used.AUTH is unsupported.Proposal:
If the URL specifies the username default, don't send that username along with the AUTH command. This would allow Redis hosting providers to share Redis URLs that include the username default when the default user is needed, and will be backward-compatible with old clients and old versions of Redis.
This is probably an idea that should go to the Redis mailing list as we would want it in other clients as well, but I thought I'd mention it here first since this is already under discussion.
Could someone clarify why it鈥檚 not possible to just remove the invalid username?
@stevenh good question. I had a recollection of certain old Redis clients not supporting empty usernames in the URI, but I can't find anything to back that up. It might be misremembered, or from so long ago that it doesn't matter - either case would mean my suggestion above is unnecessary.
In support of just removing the invalid username, the IANA doc suggests doing just that.
Can anyone confirm removing the username fixes this?
a quick update on this. we started removing the h from the DATABASE_URL on Heroku. This is currently only enabled for Redis 6 and we are looking how to safely backport this to older Redis versions.
We started to rollout this feature for Redis 4 and 5. This will roughly take 2 weeks as we are really cautious with this change and only enable it for a small percentage at a time. https://devcenter.heroku.com/changelog-items/1932
Thanks for the updates 馃槉
@beanieboi how did the update go, can we close this bug now?
We can't change it for existing Redis 4/5 but Redis 6 should work as expected.
So to confirm my understanding the planned rollout for redis 4/5 is now longer on the cards?
@beanieboi any feedback on the questions above?
@stevenh that is correct, I'm interested if there is anything that blocks you from upgrading to Redis 6
Nothing here, I was just trying to clarify for users of Heroku.
Thanks for the response, I'll close this issue now we have all the details.