-
Notifications
You must be signed in to change notification settings - Fork 821
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
fix bug: avoid updating directly cached resource template #3879
fix bug: avoid updating directly cached resource template #3879
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #3879 +/- ##
==========================================
- Coverage 54.98% 54.97% -0.02%
==========================================
Files 228 228
Lines 21786 21791 +5
==========================================
Hits 11980 11980
- Misses 9167 9172 +5
Partials 639 639
Flags with carried forward coverage won't be shown. Click here to find out more.
|
931f1e4
to
472d5c5
Compare
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.
Thanks a lot.
In order to prevent other places where the utility methods are called from modifying the objects in the cache, I think it would be better to directly make modifications within the utility methods.
Furthermore, this issue indicates that we do not have an end-to-end (E2E) coverage for this scenario. If possible, could you please provide an additional E2E use case or create an issue to track this task?
The number of resources may be huge, and the calling frequency of this utility function is very high. It is obviously not necessary to perform a deep copy every time we read a resource through this utility function. We only make a deep copy in a few places that need to be modified.
good suggestion. |
In this case, should we consider adding some comments in the utility func to indicate the need for attention when modifying cache issues, so as to prevent overlooking this factor when using it in new places? |
👍 |
472d5c5
to
2dae022
Compare
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.
Thanks
/lgtm
for clean up policy Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2dae022
to
909ba85
Compare
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
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.
/assign
@whitewindmills can you help update the release note? Maybe we need to cherry-pick it to the previous branch. |
done |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
@XiShanYongYe-Chang @RainbowMango should we cherry-pick it to the previous branch? |
I think it is necessary. |
+1 |
…-#3879-upstream-release-1.5 Automated cherry pick of #3879: avoid updating directly cached resource template for clean up
…-#3879-upstream-release-1.4 Automated cherry pick of #3879: avoid updating directly cached resource template for clean up
…-#3879-upstream-release-1.6 Automated cherry pick of #3879: avoid updating directly cached resource template for clean up
What type of PR is this?
/kind bug
What this PR does / why we need it:
avoid updating directly cached resource template.
Which issue(s) this PR fixes:
Fixes #3878
Special notes for your reviewer:
Does this PR introduce a user-facing change?: