agix
May 5, 2020, 10:14am
1
Hi,
I just set a redis string named IP_127.0.0.1 but as Redis node is using lodash set it convert it to a weird data structure when I try to get it using KEYS.
[
{
"IP_127": [
[
[
null,
null,
"test"
]
]
]
}
]
async function getValue(client: redis.RedisClient, keyName: string, type?: string) {
if (type === undefined || type === 'automatic') {
// Request the type first
const clientType = util.promisify(client.type).bind(client);
type = await clientType(keyName);
}
if (type === 'string') {
const clientGet = util.promisify(client.get).bind(client);
return await clientGet(keyName);
} else if (type === 'hash') {
const clientHGetAll = util.promisify(client.hgetall).bind(client);
return await clientHGetAll(keyName);
} else if (type === 'list') {
const clientLRange = util.promisify(client.lrange).bind(client);
return await clientLRange(keyName, 0, -1);
} else if (type === 'sets') {
const clientSMembers = util.promisify(client.smembers).bind(client);
return await clientSMembers(keyName);
}
}
I just wonder which use case is covered by this behaviour.
thx
jan
May 5, 2020, 12:44pm
2
Welcome to the community @agix !
Totally agree that should not work like that and I would consider a bug in this case. Will fix it and release with next version.
agix
May 5, 2020, 1:40pm
3
It’s weird as the naive way is to just set the key of the object without lodash. It means the people who did this had a reason…
I found a workaround setting my redis key like this : ["IP_127.0.0.1"]
it’s a bit crappy but it works.
jan
May 5, 2020, 2:00pm
4
I did it around 10 months ago. And I probably just did it because I did not think about that people would use dots in a key name as I personally would never do that (have however no idea about redis and if that is something normal). For “Get” I did use it purposely to allow setting it on deeper levels.
Is fixed and will be released with the next version:
https://github.com/n8n-io/n8n/commit/adff086ea21eeec5e925352345765be032ab6fa4
jan
May 12, 2020, 3:17pm
5
Got released with [email protected]
It sadly contains a few breaking changes so please make sure to check here before upgrading:
# n8n Breaking Changes
This list shows all the versions which include breaking changes and how to upgrade.
## 0.165.0
### What changed?
The Hive node now correctly rejects invalid SSL certificates when the "Ignore SSL Issues" option is set to False.
### When is action necassary?
If you are using a self signed certificate with The Hive.
### How to upgrade:
Go to the credentials for The Hive, Enable the "Ignore SSL Issues" option.
## 0.139.0
This file has been truncated. show original