Skip to content
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

Merged

Conversation

mshitrit
Copy link
Member

@mshitrit mshitrit commented Feb 18, 2024

ECOPROJECT-1836, ECOPROJECT-1884

  • not omitting remediation started event for not found nodes
  • using node not found event from common
  • adding indication of whether the message was omitted by the agent or manager

- 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]>
Copy link
Contributor

openshift-ci bot commented Feb 18, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Feb 18, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mshitrit
Copy link
Member Author

/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")
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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).

Copy link
Member

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?

Copy link
Member Author

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

@razo7
Copy link
Member

razo7 commented Feb 18, 2024

/lgtm
Unless you would like to make a minor change by using the eventType from Corev1

@openshift-ci openshift-ci bot added the lgtm label Feb 18, 2024
@mshitrit mshitrit marked this pull request as ready for review February 18, 2024 14:24
@openshift-ci openshift-ci bot requested review from razo7 and slintes February 18, 2024 14:25
@openshift-merge-bot openshift-merge-bot bot merged commit 27560cb into medik8s:main Feb 18, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants