fix: Handle same-name resources with different kinds in HCO related objects test#4037
fix: Handle same-name resources with different kinds in HCO related objects test#4037rlobillo wants to merge 1 commit intoRedHatQE:mainfrom
Conversation
…bjects test
The test_no_new_hco_related_objects comparison used a dict {name: kind},
which silently dropped entries when multiple resources shared the same
name but had different kinds (e.g., Deployment and ServiceAccount for
kubevirt-console-plugin). Switching to a set of (name, kind) tuples
preserves all entries and correctly detects mismatches.
Also adds the two new ServiceAccount entries (kubevirt-console-plugin,
kubevirt-apiserver-proxy) introduced by HCO PR RedHatQE#3953 for security
hardening.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR refactors HCO-related object comparison logic from DeepDiff-based to set-based diffs and updates the data structure to use (name, kind) tuples as keys instead of single names. Additionally, a new SERVICEACCOUNT_STR constant is introduced and mappings in ALL_HCO_RELATED_OBJECTS are adjusted for kubevirt console plugin and API server proxy resources. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4037 +/- ##
==========================================
+ Coverage 98.56% 98.60% +0.04%
==========================================
Files 25 25
Lines 2297 2369 +72
==========================================
+ Hits 2264 2336 +72
Misses 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/build-and-push-container |
|
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
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/cherry-pick cnv-4.21 |
|
Cherry-pick requested for PR: |
|
/build-and-push-container |
|
/retest build-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-4037 published |
1 similar comment
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-4037 published |
|
/verified |
Short description:
The test_no_new_hco_related_objects comparison used a dict {name: kind}, which silently dropped entries when multiple resources shared the same name but had different kinds (e.g., Deployment and ServiceAccount for kubevirt-console-plugin). Switching to a set of (name, kind) tuples preserves all entries and correctly detects mismatches.
Also adds the two new ServiceAccount entries (kubevirt-console-plugin, kubevirt-apiserver-proxy) introduced by HCO PR #3953 for security hardening.
More details:
N/A
What this PR does / why we need it:
N/A
Which issue(s) this PR fixes:
N/A
Special notes for reviewer:
N/A
jira-ticket:
https://issues.redhat.com/browse/CNV-81032
Summary by CodeRabbit
Tests
Chores