-
Notifications
You must be signed in to change notification settings - Fork 13
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
Group expectations evaluation #4
Conversation
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
… logic Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@suse.com>
fe7f7a9
to
3b43913
Compare
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.
Excellent piece of work @fabriziosestito and @CDimonaco , really fantastic.
The work on the evaluation.ex
file is totally great.
I took my time to check the evaluation flow, and even though it is not that simple, with some effort it is easy to understand.
Maybe some docstring explanation above about the general process would help others to understand, something like, but in any case the code is enough meaningful. So don't give to much thought to this hehe
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.
LGTM
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.
LGTM
This PR adds the group expectation evaluation and removes the local one.
An expectation declared with
expect
is expected to returntrue
on all the agents that execute the check.An expectation declare with
expect_same
is expected to returnthe same value
on all the agents that execute the check.It also refactors the shape of the result struct, aggregating the agent evaluations in check results and the check results in an execution result, so we can remove this responsibility from the dashboard.
ATM we provide basic error handling if an expression is invalid or a fact is missing, we will provide more errors in followup PRs and if we add the rustler module for evaluating expressions.