[VIRT] Add client parameter to descheduler resources#5185
Conversation
Signed-off-by: Denys Shchedrivyi <dshchedr@redhat.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
📝 WalkthroughWalkthroughThis PR updates pytest fixtures in the descheduler test suite to accept and propagate an ChangesFixture Client Propagation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped 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. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5185 published |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
echo "=== Get the diff to find first changed line ==="
git diff HEAD~1 -- tests/virt/node/descheduler/conftest.py
echo ""
echo "=== Find tests using descheduler_operator_reconciled fixture ==="
rg -rn 'descheduler_operator_reconciled' tests/
echo ""
echo "=== Check for smoke markers in descheduler tests ==="
rg -rn '`@pytest.mark.smoke`' tests/virt/node/descheduler/
echo ""
echo "=== Check for gating markers in descheduler tests ==="
rg -rn '`@pytest.mark.gating`' tests/virt/node/descheduler/
echo ""
echo "=== List test files in descheduler directory ==="
fd -e py . tests/virt/node/descheduler/
echo ""
echo "=== Check smoke tests globally ==="
rg -l '`@pytest.mark.smoke`' tests/ | head -20
echo ""
echo "=== Check gating tests globally ==="
rg -l '`@pytest.mark.gating`' tests/ | head -20
echo ""
echo "=== Show conftest.py content ==="
cat tests/virt/node/descheduler/conftest.pyLength of output: 17061 🏁 Script executed: #!/bin/bash
# Get the latest commit SHA for the PR
PR_COMMIT=$(gh pr view 5185 --repo RedHatQE/openshift-virtualization-tests --json headRefOid --jq '.headRefOid')
echo "Commit SHA: $PR_COMMIT"
# Post inline comment on the first changed line (line 40 of conftest.py)
gh api \
--method POST \
repos/RedHatQE/openshift-virtualization-tests/pulls/5185/comments \
-f body="**Test Execution Plan**
**Run smoke tests: False** — No \`@pytest.mark.smoke\` tests exist in \`tests/virt/node/descheduler/\`.
**Run gating tests: False** — No \`@pytest.mark.gating\` tests exist in \`tests/virt/node/descheduler/\`.
**Affected tests to run:**
- \`tests/virt/node/descheduler/test_descheduler.py\` — uses \`descheduler_long_lifecycle_profile\` and \`descheduler_kubevirt_relieve_and_migrate_profile\` fixtures, which depend on the modified \`descheduler_operator_reconciled\` fixture; also uses \`utilization_imbalance\` which received the \`client=admin_client\` fix on \`PodDisruptionBudget\`
- \`tests/virt/node/descheduler/test_descheduler_psi_metrics.py\` — shares the same conftest scope
**Real tests (cluster required)**
Error/fix path (verify \`client\` is correctly passed to \`Deployment\` and \`PodDisruptionBudget\`):
\`\`\`
pytest tests/virt/node/descheduler/test_descheduler.py -k 'utilization' -v
\`\`\`
Expected: \`PodDisruptionBudget\` and \`Deployment\` resources created without authentication errors using \`admin_client\`.
Happy path (regression — descheduler reconciliation still works):
\`\`\`
pytest tests/virt/node/descheduler/test_descheduler.py -v
\`\`\`
Expected: \`descheduler_operator_reconciled\` fixture scales deployment to 0 and back without errors; all tests in the module pass." \
-f commit_id="$PR_COMMIT" \
-f path="tests/virt/node/descheduler/conftest.py" \
-f side="RIGHT" \
-F line=40Length of output: 5897 |
|
/approve |
rnetser
left a comment
There was a problem hiding this comment.
please update the PR description
done |
|
/lgtm |
|
/retest security-committer-identity /retest security-suspicious-paths |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-5185. |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published |
|
/cherry-pick cnv-4.22 |
|
Cherry-picked PR [VIRT] Add client parameter to descheduler resources into cnv-4.21: #5253 |
|
Cherry-picked PR [VIRT] Add client parameter to descheduler resources into cnv-4.22: #5254 |
|
Cherry-picked PR [VIRT] Add client parameter to descheduler resources into cnv-4.20: #5255 |
What this PR does / why we need it:
Add client parameter to descheduler resources
Summary by CodeRabbit