-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #26075: Trying to save a group with empty criteria removes all entries #6097
base: branches/rudder/8.1
Are you sure you want to change the base?
Conversation
742be8e
to
c90ec36
Compare
I don't think this is the correct correction. This correction is just handling the "UX should not be annoying" part, but it doesn't correct the cause, which is: we saved something in LDAP, and we aren't able to read it back to retrieve the same state. Then, we would at least get back the same list of criteria in the group - which in the the case of And only at that point, we add the UX layer, which forces the user to see the consequences of their criteria on the node list before saving. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the group unserialisable back
…es all entries Fixes #26075: Trying to save a group with empty criteria removes all entries
PR updated with a new commit |
1 similar comment
PR updated with a new commit |
…a removes all entries Fixes #26075: Trying to save a group with empty criteria removes all entries
"query": { | ||
"select": "nodeAndPolicyServer", | ||
"composition": "and", | ||
"transform": "invert", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why invert ? (really to know: it's not the default queries, and not relevant to that problem, so I'm wondering)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's to have it at least covered in test somewhere, I don't think the value is tested anywhere.
I think the value for "transform" is validated before the criteria
"objectType": "node", | ||
"attribute": "nodeId", | ||
"comparator": "eq", | ||
"value": "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not sure that we want to forbid that. Things could be the empty string and being valid. And it could be different than "present/absent". Typically in overriding case, where you specifficaly want to override a description to empty string.
…criteria removes all entries Fixes #26075: Trying to save a group with empty criteria removes all entries
PR updated with a new commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we will want to totally remove the raw parser in the future, the strcit seems to be a better fit for what we want. But for now, we will remain safe for the patch release.
This PR is not mergeable to upper versions. |
https://issues.rudder.io/issues/26075
""