-
Notifications
You must be signed in to change notification settings - Fork 197
ENT-13303: Fixed booleans for classes in augments #6024
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
base: master
Are you sure you want to change the base?
Conversation
Ticket: ENT-13303 Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
bd8e22a to
657aa1d
Compare
| OpenLog(default_facility); | ||
| SetSyslogFacility(default_facility); | ||
|
|
||
| EvalContextClassPutHard(ctx, "any", "source=agent"); |
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 explain why this is redundant in the commit message. It's not clear from looking at the diff.
| else if (strcmp("true", name) == 0) | ||
| { | ||
| ret = EXPRESSION_VALUE_TRUE; | ||
| } |
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.
Same here. Some explanation would be helpful :)
| char vbuff[CF_BUFSIZE]; | ||
|
|
||
| EvalContextClassPutHard(ctx, "any", "source=agent"); /* This is a reserved word / wildcard */ | ||
| EvalContextClassPutHard(ctx, "true", "source=agent"); |
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.
The ticket does not mention adding true as a hard class. I wonder if this can get some implications. It should be possible to map the JSON type true to the hard class any when parsing the augments, without adding a new hard class. Whether or not true should be a hard class or not, we can discuss with @olehermanse and @nickanderson .
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.
Yeah, I would be quite wary of introducing such a generic class. My concern woul d be people using it within a bundle as a bundle scoped class for some condition (like pass in tests) that all of the sudden is now always true.
No description provided.