This only affect "Global configuration of all nodes" introduce by https://issues.rudder.io/issues/21546
API response for "Global configuration of all nodes":
{
"action": "ruleDetails",
"id": "32377fd7-02fd-43d0-aab7-28460a91347b",
"result": "success",
"data": {
"rules": [
{
"id": "32377fd7-02fd-43d0-aab7-28460a91347b",
"displayName": "Global configuration for all nodes",
...
"targets": [
"special:all"
],
...
}
]
}
}
The parameter target
doesn't contains include
and exclude
group in "Global configuration of all nodes", but when we create a new rule:
{
"action": "ruleDetails",
"id": "a438c450-c095-4d22-9341-b151199f5346",
"result": "success",
"data": {
"rules": [
{
"id": "a438c450-c095-4d22-9341-b151199f5346",
"displayName": "Rule created by user",
...
"targets": [
{
"include": {
"or": [
"special:all"
]
},
"exclude": {
"or": []
}
}
],
...
}
]
}
}
So in Elm code, we cannot differentiate exclude and include groups for the target, so it appears in both exclude and include
Why this is +2 and -2 ?
Because `getDiffGroups` function in elm count 2 switchs:
1. One switch for special:all
group from exclude to include (+1, -1)
2. Another one special:all
from include to exclude (+2, -2)