-
Notifications
You must be signed in to change notification settings - Fork 21
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
Reset the complianceState when Pending #54
Reset the complianceState when Pending #54
Conversation
The situation this is meant to fix is not fully understood. But in case a policy template that was previously pending somehow has some status that has not yet made its way into the Policy's status, this will reset it, so that the policy controller knows to send a new compliance event. Refs: - https://issues.redhat.com/browse/ACM-4699 Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
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.
/hold for other reviews
This is an odd corner of code, but this does make sense to resolve the E2E test. I guess resetting the compliance forces the policy controller to send another event to verify its compliance?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dhaiducek, JustinKuli, yiraeChristineKim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Yes exactly. We already did this for some cases involving template-errors. I think it could be the case whenever the latest status was supplied by the template-sync controller, instead of the policy-controller. So far I think (hope) that the only situations for that are when it goes into Pending, and when it has a template-error. The policy-controller doesn't really know about the Policy (how confusing is that? 😄) so it doesn't see those statuses. So it assumes the last status is the last one it sent, and it doesn't need to send another. |
/unhold Matt's out until Monday and that policy ordering test is getting pretty annoying. I say let's give this a shot. |
The situation this is meant to fix is not fully understood. But in case a policy template that was previously pending somehow has some status that has not yet made its way into the Policy's status, this will reset it, so that the policy controller knows to send a new compliance event.
Refs: