Skip to content

improve: remove JSON Patch from PrimaryUpdateAndCacheUtils #2795

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

Closed
wants to merge 2 commits into from

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented May 13, 2025

No description provided.

csviri added 2 commits May 13, 2025 14:11
If no optimistic locking is used a list element removal might remove an not desired element
if there was a concurrent element removal.

Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
@openshift-ci openshift-ci bot requested review from metacosm and xstefank May 13, 2025 12:14
@csviri csviri changed the title remove edit improve: remove JSON Patch from PrimaryUpdateAndCacheUtils May 13, 2025
@csviri
Copy link
Collaborator Author

csviri commented May 13, 2025

I think this is a gray area to discuss, we might say that this is the responsibility of the user to evaluate if JSON Patch is valid for his/her use case.

Copy link
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The javadoc on this class should be improved, though as it is unclear what the methods do concretely, the parameters are not clearly or correctly documented. Usage should be documented as well.

@csviri
Copy link
Collaborator Author

csviri commented May 14, 2025

@metacosm usage is documented here: https://javaoperatorsdk.io/docs/documentation/reconciler/#using-internal-cache

Will do some improvements today, and will take a look on javadoc too

@csviri
Copy link
Collaborator Author

csviri commented May 14, 2025

improved javadoc and namings is a followup PR: #2796

@csviri
Copy link
Collaborator Author

csviri commented May 14, 2025

Still a bit hesitating on this one, we might just point out the risk of JSON Patch.

@csviri
Copy link
Collaborator Author

csviri commented May 14, 2025

at the end I think a better approach is just document the risk, will do it here:
https://github.com/operator-framework/java-operator-sdk/pull/2799/files

@csviri csviri closed this May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants