-
Notifications
You must be signed in to change notification settings - Fork 30
OCPBUGS-37300: Fix forced reinit issue #619
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
Conversation
This commit resolves issues in GetRemovedNodeHoldoffAnnotation and GetAddedNodeHoldoffAnnotation related to managing the holdoff annotation for FileIntegrity nodes. Previously, node removal could fail in cases where the node to be removed was at the beginning, middle, or end of a comma separated list due to incorrect string manipulation.
|
@Vincent056: This pull request references Jira Issue OCPBUGS-37300, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Vincent056 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@Vincent056: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
rhmdnd
left a comment
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.
Looks like a reasonable change. Is there a way to force the operator into a state where it needs to exercise this code in an e2e test?
| return ficopy.Annotations, true | ||
| } | ||
|
|
||
| AddedNode := strings.TrimSpace(nodeName) |
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.
nit: We could adjust the visibility of this since it's only used in this function.
|
|
||
| // Check if nodeName is already in the list | ||
| for _, n := range nodes { | ||
| if strings.EqualFold(strings.TrimSpace(n), AddedNode) { |
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.
Is this where the main issue was? Otherwise, most of the logic looks the same, just in a different order, but here we changed the comparison from using strings.Contains to iterating the entire list of nodes and comparing them.
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.
the main issue was because https://github.com/openshift/file-integrity-operator/pull/619/files#diff-a3206732c69662d901d8e5ccf08d084332c8dbfb58c67996b5bb9ec5b6ed4425L164, the replace is not correct
|
@Vincent056 I deployed the fio operator from this PR #619. Two test scenarios tested. Both passed. Scenario 2:
|
|
/label qe-approved |
|
/jira refresh |
|
@xiaojiey: This pull request references Jira Issue OCPBUGS-37300, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@xiaojiey: This pull request references Jira Issue OCPBUGS-37300, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
yuumasato
left a comment
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
@Vincent056 Would be good to add tests, either unit or e2e.
|
@Vincent056: Jira Issue OCPBUGS-37300: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-37300 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
OCPBUGS-37300: Fix forced reinit issue
OCPBUGS-37300: Fix forced reinit issue
This commit resolves issues in
GetRemovedNodeHoldoffAnnotationandGetAddedNodeHoldoffAnnotationrelated to managing the holdoff annotation forFileIntegrityObject. Previously, node removal could fail in cases where the node to be removed was at the beginning, middle, or end of a comma separated list due to incorrect string manipulation.