Skip to content

COO-1699:chore: migrate to controller-runtime client.Apply over client.Patch#1031

Open
jan--f wants to merge 1 commit into
rhobs:mainfrom
jan--f:client-apply
Open

COO-1699:chore: migrate to controller-runtime client.Apply over client.Patch#1031
jan--f wants to merge 1 commit into
rhobs:mainfrom
jan--f:client-apply

Conversation

@jan--f

@jan--f jan--f commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@openshift-ci-robot

openshift-ci-robot commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

@jan--f: This pull request references COO-1699 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from lihongyan1 and marioferh March 10, 2026 12:10
@openshift-ci

openshift-ci Bot commented Mar 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: e952e01c-43d0-4769-9525-a713187a0d8e

📥 Commits

Reviewing files that changed from the base of the PR and between 8ee6ecc and ddf29b1.

📒 Files selected for processing (2)
  • pkg/controllers/observability/reconcilers_test.go
  • pkg/reconciler/reconciler.go

📝 Walkthrough

Walkthrough

The Updater reconciler's resource reconciliation path was switched from a deprecated Patch-based apply approach to using client.Apply directly. A new internal clientObjectApplyConfig type wraps client.Object to satisfy apply-configuration requirements, implementing metadata getters and JSON marshaling. Corresponding unit tests for tracing-capability-enabled scenarios were updated to mock a single Apply call instead of multiple Patch calls per resource type.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided, so there is no meaningful PR summary to evaluate. Add a short description of the migration from client.Patch to client.Apply and any noteworthy implementation or test changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: switching from client.Patch to client.Apply.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Signed-off-by: Jan Fajerski <jan@fajerski.name>
return &av
}

func (a *clientObjectApplyConfig) MarshalJSON() ([]byte, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should also unmarshalling be delegated to a?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants