← Back to Pull requests

CherryPicked: [cnv-4.22] [Storage] DV stop status functions #6527

Open
unknown opened this pull request with 256 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 12, 2026 12:21 UTC
Author

##### What this PR does / why we need it:
In DataVolume object, you can pass stop_status_func and stop_status_func_kwargs into .wait_for_dv_success method and make it fail sooner than the set timeout. The stop_status_func is passed in the sampler and checked every second so you can inject checking DV status or if the DV creation restarted 3 times, etc. and stop it preliminary based on real status, not timeout.

This will reduce the time for some storage tests because the method won't have to solely wait for timeout to fail.

##### Which issue(s) this PR fixes:
https://redhat.atlassian.net/browse/CNV-28143

##### Special notes for reviewer:

##### jira-ticket:
https://redhat.atlassian.net/browse/CNV-98966

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

Bug Fixes
Improved clone and DataVolume readiness handling by detecting excessive restart attempts.
* Prevented readiness checks from waiting indefinitely when restart thresholds are reached.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

##### Backport details:

  • Target branch: cnv-4.22

  • Source PR: https://github.com/RedHatQE/openshift-virtualization-tests/pull/5204

  • Source merge commit: 2b6c70c5e1fa638732cbb1fa18640d417b3cc4bf

  • Bot recovery instructions: https://github.com/RedHatQE/openshift-virtualization-tests/pull/5204#issuecomment-6123819531

  • This backport contains the CDI Clone call-site changes and the shared tests/storage/stop_status_utils.py helper.

  • The import conflict was resolved by retaining the cnv-4.22 utilities.constants import and adding the helper import.

  • The changed files passed the configured pre-commit hooks and gitlint. No cluster tests were run.
  • Linked Jira work:

  • stop_status_utils: https://redhat.atlassian.net/browse/CNV-98966

  • CDI Clone: https://redhat.atlassian.net/browse/CNV-98965
  • ---
    _Generated by Codex · Agents: Codex (primary) · Skills: backport-cnv-tests · Models: GPT-6 (exact runtime variant unavailable)_

    Diff: 256 lines (+192 / -64) across 3 files Reviewer: RoniKishner Review duration: 9983m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 256 lines diff across 3 files
    0.44
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.332
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #6527"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.1% (MEDIUM) · Higher = larger blast radius
    44.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.5% · Safe to merge
    23.5%