-
Notifications
You must be signed in to change notification settings - Fork 59
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
Implement an 'audit' reporter that will terminate Chef Client runs on profile failures #380
Implement an 'audit' reporter that will terminate Chef Client runs on profile failures #380
Conversation
Signed-off-by: Scott Babcock <scoba@hotmail.com>
Signed-off-by: Scott Babcock <scoba@hotmail.com>
8b13be3
to
dc0e34d
Compare
Signed-off-by: Scott Babcock <scoba@hotmail.com>
Signed-off-by: Scott Babcock <scoba@hotmail.com>
Looks like the Travis failures were caused by a configuration issue that's been resolved. |
Given that the purpose of this reporter is to throw an error, I don't know how to implement a test for it. |
Thank you Scott for bringing this option back into the audit cookbook. I pushed a commit to this branch: Can you cherry-pick that into your fork please? It adds unit tests for AuditEnforcer and takes care of lint errors. |
Signed-off-by: Alex Pop <apop@chef.io>
Merged unit tests and linting fixes from @alexpop |
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 reviewed the changes made by @alexpop, and they look great!
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.
Much appreciated Scott!
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.
As far as I can see, this will make a reporter that fails. I'm not sure how much usefulness that has, since it is my understanding that the chef client run has already completed at this point, and you would only have an error in the reporter, not a node that failed to converge; I may be mistaken.
Of more concern to me is that this is to replicate a feature that was withdrawn. I'm trying to get context on why fail_if_any_audit_failed was removed, and whether those reasons are any different today.
Finally, the TravisCI failure is a linting failure - we need those addressed before we can accept. Pinning the chefstyle gem in the Gemfile may be advisable. Thanks!
Signed-off-by: Alex Pop <apop@chef.io>
The pull request that added the Here's the specific comment:
The intent of my PR is to fail actual |
As for usefulness, this enables me to terminate a pipeline if a non-compliant node is encountered. The current behavior is to passively report the failure and continue to the next stage, which will then choke because of the previously detected issue. |
Sorry, it's really easy to close pull requests accidentally in the mobile view of GitHub. |
@alexpop has been incredibly helpful on this PR! Many thanks! |
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 see, it took me a bit to get when this would fire - thanks for this!
Description
This pull request implements an
audit enforcer
reporter to replace thefail_if_any_audits_failed
feature that was removed a while ago.Issues Resolved
[List any existing issues this PR resolves]
Check List