-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Prevent modifications to passed in objects #3756
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
Comments
Related to this, do we want another issue on write protecting the informer caches? |
Wasn't this something we discarded? It's OK for me, but given the additional processing overhead, it should be something configurable. |
That is the idea, to propose/collect possible solutions - that would be optional: secrets().withImmutableStore().inform() Either could be implemented with a wrapper that clones or adding logic for storage functions - for example to hold just strings in memory. |
Is your task related to a problem? Please describe
Related to #3078 and possibly to operator-framework/java-operator-sdk#830 modifications should not be directly made to passed in objects.
Describe the solution you'd like
Simply reverting the change is not quite enough. As the object could have been obtained from a cache that simply creates a narrow race condition. More than likely the only solution is to clone prior to making the modification. The impetus for that cloning is mitigated if cloning were enforced for any resource obtained by the informer cache.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: