Skip to content

refactor: remove deprecated wait() method from DataVolume class#2704

Open
ema-aka-young wants to merge 1 commit into
RedHatQE:mainfrom
ema-aka-young:cnv-73197-remove-dv-wait
Open

refactor: remove deprecated wait() method from DataVolume class#2704
ema-aka-young wants to merge 1 commit into
RedHatQE:mainfrom
ema-aka-young:cnv-73197-remove-dv-wait

Conversation

@ema-aka-young
Copy link
Copy Markdown
Contributor

@ema-aka-young ema-aka-young commented Apr 30, 2026

Short description:

The intention is to allow DataVolume.wait() to fall back to the parent Resource.wait() method.

More details:
What this PR does / why we need it:

Deprecate DataVolume.wait() in favor of wait_for_dv_success() to fix bad practice and prevent bugs.

Which issue(s) this PR fixes:

This PR will allow us to safely de-quarantine https://github.com/RedHatQE/openshift-virtualization-tests/blob/2ee0d6e604bc3ade241bfb1a53879875eb7d2ecc/tests/storage/cdi_import/test_import_http.py#L62

Special notes for reviewer:

This PR needs to be merged first

This PR is part of this task, and continues the work started in #2613

Bug:

Summary by CodeRabbit

  • New Features
    • Added support for a new DataProtectionApplication resource for managing backup/restore configuration.
  • Chores
    • Removed the deprecated DataVolume wait method (may affect workflows that relied on built-in waiting).
    • Project version bumped.
    • Updated pre-commit linter hook version.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@ema-aka-young has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 52 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 663fad0b-0408-40ed-ac8c-a8d3599ec5e4

📥 Commits

Reviewing files that changed from the base of the PR and between 0a07b2e and 3da5955.

📒 Files selected for processing (1)
  • ocp_resources/datavolume.py

Walkthrough

Removes DataVolume.wait(), adds a new DataProtectionApplication resource (with serialization and validation), exposes the OADP API group constant, updates the gitleaks pre-commit hook, and bumps the package version.

Changes

Primary changes

Layer / File(s) Summary
API group constant
ocp_resources/resource.py
Adds Resource.ApiGroup.OADP_OPENSHIFT_IO = "oadp.openshift.io".
DataProtectionApplication resource
ocp_resources/data_protection_application.py
Adds DataProtectionApplication (subclass of NamespacedResource) with an __init__ capturing optional spec fields and to_dict that calls the superclass serializer, requires configuration when no kind/yaml is present, and writes non-None spec fields.
CI hook and metadata bump
.pre-commit-config.yaml, pyproject.toml
Changes gitleaks hook rev from v8.30.1 to v8.30.0 and updates project version 11.0.12611.0.127.
Deprecated method removal
ocp_resources/datavolume.py
Removes the deprecated DataVolume.wait() method and its waiting/deprecation logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: removing the deprecated wait() method from the DataVolume class, which is the primary modification in the changeset.
Description check ✅ Passed The PR description covers all required template sections with substantive content including short description, purpose, related issues, special notes, and context about the refactoring work.
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.

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

✨ 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 and usage tips.

@ema-aka-young ema-aka-young marked this pull request as ready for review April 30, 2026 08:10
@ema-aka-young ema-aka-young marked this pull request as draft April 30, 2026 08:17
@ema-aka-young ema-aka-young marked this pull request as ready for review May 4, 2026 07:31
@redhat-qe-bot
Copy link
Copy Markdown
Contributor

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 tox - Run Python test suite with tox
  • /retest python-module-install - Test Python package installation
  • /retest conventional-title - Validate commit message format
  • /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. Status Checks: All required status checks must pass
  3. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  4. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove
  • rnetser

Reviewers:

  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge
AI Features
  • Conventional Title: Mode: fix (claude/claude-opus-4-6[1m])
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • 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.

@redhat-qe-bot redhat-qe-bot requested a review from rnetser May 4, 2026 07:32
@redhat-qe-bot redhat-qe-bot requested a review from myakove May 4, 2026 07:32
@redhat-qe-bot redhat-qe-bot changed the title Remove deprecated wait() method from DataVolume class refactor: remove deprecated wait() method from DataVolume class May 4, 2026
@ema-aka-young
Copy link
Copy Markdown
Contributor Author

/verified
with RedHatQE/openshift-virtualization-tests#4862 (comment)

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.

4 participants