-
Notifications
You must be signed in to change notification settings - Fork 17
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
Events refactoring #190
Events refactoring #190
Conversation
- using node not found event from common - adding indication of whether the message was omitted by the agent or manager Signed-off-by: Michael Shitrit <[email protected]>
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mshitrit 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 |
/test 4.15-openshift-e2e |
@@ -167,7 +167,7 @@ var _ = Describe("SNR Controller", func() { | |||
It("Remediation flow", func() { | |||
node := verifyNodeIsUnschedulable() | |||
|
|||
verifyEvent("Normal", "RemediationStarted", "Remediation started") | |||
verifyEvent("Normal", "RemediationStarted", "Remediation started by SNR manager") |
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.
How about using EventTypeNormal and EventTypeNormal from https://github.com/kubernetes/api/blob/v0.29.2/core/v1/types.go#L6354-L6359 instead of typing the string? Here and in other occurrences in this file.
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.
Instead of using the string RemediationStarted we can also use the common remediation event reasons.
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 don't think it's very significant in test code.
One can even argue against it in test code, because it would be safer to validate vs a "decoupled " hardcoded value (personally not an issue as well IMO).
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.
What about the event type?
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.
TBH my original response for the event type question 😅 (I only saw the followup after I posted)
I was just luck that my answer fitted nicely the second question
/lgtm |
ECOPROJECT-1836, ECOPROJECT-1884