-
Notifications
You must be signed in to change notification settings - Fork 366
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
🐛 Role and ClusterRole merger should not modify cache objects #2604
🐛 Role and ClusterRole merger should not modify cache objects #2604
Conversation
} | ||
|
||
// The Role is a new one, deepcopy it in the current array. | ||
current = append(current, cachedRole.DeepCopy()) |
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.
use DeepCopyInto. It saves allocations.
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.
Why don't we keep track of deepcopied roles and only do it when the second instance is seen?
/lgtm I think we can improve that even more. But this stops the bleeding. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts 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 |
This reverts commit 0831b69.
Signed-off-by: Vince Prignano <vincepri@redhat.com>
/lgtm |
@@ -0,0 +1,208 @@ | |||
/* | |||
Copyright 2021 The KCP Authors. |
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.
2023?
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.
:) Copy paste
Signed-off-by: Vince Prignano vincepri@redhat.com
Summary
This PR also reverts 0831b69
Related issue(s)
Fixes #