Skip to content

Comments

Use get_client from ocp_resources and remove example for ocp_utilities/infra.py#448

Merged
myakove merged 1 commit intoRedHatQE:mainfrom
dbasunag:get_client
Feb 12, 2026
Merged

Use get_client from ocp_resources and remove example for ocp_utilities/infra.py#448
myakove merged 1 commit intoRedHatQE:mainfrom
dbasunag:get_client

Conversation

@dbasunag
Copy link
Contributor

@dbasunag dbasunag commented Feb 12, 2026

Short description:

Repository using this repo is getting this warning for a while:

 /home/odh/opendatahub-tests/.venv/lib64/python3.13/site-packages/ocp_utilities/monitoring.py:57: DeprecatedWarning: get_client is deprecated as of 5.0.49 and will be removed in 6.0. Please use `from ocp_resources.resource import get_client` instead
12:44:12      self.client = client or get_client()
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
Bug:

Summary by CodeRabbit

  • Documentation

    • Removed an example from the README.
  • Refactor

    • Updated module import sources for improved code organization.

@redhat-qe-bot
Copy link
Collaborator

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: Disabled for this repository
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: All label categories are enabled (default configuration)

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest python-module-install - Test Python package installation
  • /retest all - Run all available tests

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 0 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove
  • rnetser

Reviewers:

  • dbasunag
  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

Walkthrough

The pull request removes a Python code example from the README documentation and updates an import statement in the monitoring module to resolve get_client from a different module path instead of the original source.

Changes

Cohort / File(s) Summary
Documentation
README.md
Removed the "Get Client" example block demonstrating get_client usage with kubeconfig path initialization.
Import Path Update
ocp_utilities/monitoring.py
Changed import source for get_client from ocp_utilities.infra to ocp_resources.resource.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning Only the short description section is filled out; the remaining required sections (More details, What this PR does, Issues, Special notes, Bug) are empty or incomplete. Complete the missing sections: explain what the PR does and why, reference any related issues, and provide special notes for reviewers about the deprecation fix.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: updating the import source for get_client and removing the outdated example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent 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 and usage tips.

@dbasunag
Copy link
Contributor Author

/verified

@myakove
Copy link
Collaborator

myakove commented Feb 12, 2026

/lgtm
/approve

@myakove myakove enabled auto-merge (squash) February 12, 2026 12:12
@myakove myakove merged commit fb80709 into RedHatQE:main Feb 12, 2026
5 checks passed
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.

5 participants