Skip to content

refactor: drop the unused Options parameter of desiredForJsonPatch - #3550

Open
csviri wants to merge 1 commit into
operator-framework:nextfrom
csviri:drop-unused-options-param
Open

refactor: drop the unused Options parameter of desiredForJsonPatch#3550
csviri wants to merge 1 commit into
operator-framework:nextfrom
csviri:drop-unused-options-param

Conversation

@csviri

@csviri csviri commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

ResourceOperations#desiredForJsonPatch takes an Options argument that it never
reads - it only clones the actual resource and applies the operator. All six
jsonPatch call sites thread the value in for nothing, which suggests the method
still honours the option. Remove the parameter.


Quality-only change: no intended behavior difference. Cut from next and
touches a disjoint set of files from the sibling cleanup PRs, so it can be merged
independently and in any order.

Verified on this branch alone: mvn -o -pl operator-framework-core,operator-framework-junit -am test
(693 core + 6 junit tests, no failures) and mvn spotless:check.

ResourceOperations#desiredForJsonPatch takes an Options argument that it never
reads - it only clones the actual resource and applies the operator. All six
jsonPatch call sites thread the value in for nothing, which suggests the method
still honours the option. Remove the parameter.
Copilot AI lite review requested due to automatic review settings August 7, 2026 11:55
@openshift-ci
openshift-ci Bot requested review from metacosm and xstefank August 7, 2026 11:55
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e79ba5e9-45d5-4740-b9f1-8d2f5737c7ab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR is a small internal refactor in ResourceOperations to remove an unused Options parameter from the private desiredForJsonPatch helper, reducing confusion about whether the helper honors Options during JSON patch preparation.

Changes:

  • Updated all jsonPatch* methods to call desiredForJsonPatch(actualResource, unaryOperator) without threading Options.
  • Simplified the private desiredForJsonPatch signature by dropping the unused Options parameter.

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