| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fabric8's no-context patch() fetches the resource from the server and computes an RFC 6902 JSON Patch diff, which removes the fields omitted from a partial resource (including the whole spec). Pass an explicit JSON_MERGE PatchContext so the non-status merge patch operations really send application/merge-patch+json.
There was a problem hiding this comment.
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Ensures JSON Merge Patch operations use an explicit Fabric8 PatchContext with PatchType.JSON_MERGE so partial-resource merge patches don’t behave like JSON Patch diffs (which can delete omitted fields).
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/resourceoperations/ResourceOperationsReconciler.java | Adds a new operation that performs a metadata-only merge patch using a partial resource. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/resourceoperations/ResourceOperationsIT.java | Adds IT coverage ensuring partial merge patches don’t delete omitted fields like spec. |
| operator-framework-core/src/test/java/io/javaoperatorsdk/operator/api/reconciler/ResourceOperationsTest.java | Strengthens unit assertions around merge patch behavior and patch type selection. |
| operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/ResourceOperations.java | Switches merge patch calls to use explicit JSON merge patch type via PatchContext. |
Sorry, something went wrong.
| public static final String LABEL_KEY = "resolved"; | ||
| public static final String LABEL_VALUE = "true"; |
| /** Answer that executes the update operation passed to the caching methods of an event source. */ | ||
| @SuppressWarnings("rawtypes") | ||
| private static Answer<Object> runUpdateOperation() { | ||
| return invocation -> | ||
| ((UnaryOperator) invocation.getArgument(1)).apply(invocation.getArgument(0)); | ||
| } |
) Fabric8's no-context patch() fetches the resource from the server and computes an RFC 6902 JSON Patch diff, which removes the fields omitted from a partial resource (including the whole spec). Pass an explicit JSON_MERGE PatchContext so the non-status merge patch operations really send application/merge-patch+json.
…erator-framework#3514) Fabric8's no-context patch() fetches the resource from the server and computes an RFC 6902 JSON Patch diff, which removes the fields omitted from a partial resource (including the whole spec). Pass an explicit JSON_MERGE PatchContext so the non-status merge patch operations really send application/merge-patch+json.
| Back | FazBrowse Home | New Git URL |
Fabric8's no-context patch() fetches the resource from the server and
computes an RFC 6902 JSON Patch diff, which removes the fields omitted
from a partial resource (including the whole spec). Pass an explicit
JSON_MERGE PatchContext so the non-status merge patch operations really
send application/merge-patch+json.