T2 node test adopted for s390x arch #1519#2577
Conversation
📝 WalkthroughWalkthroughAdds s390x support and related constants across tests: new machine-type constants, s390x-aware fixture parameters and conditional behavior (CPU threads, memory), widespread Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
🚥 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)
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 #2577 +/- ##
=======================================
Coverage 98.38% 98.39%
=======================================
Files 25 25
Lines 2166 2174 +8
=======================================
+ Hits 2131 2139 +8
Misses 35 35
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:
|
ef8305e to
269f4fa
Compare
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-2577 published |
|
Started Jenkins builds to test changes: |
|
change - reordered markers as asked in PR review comments /build-and-push-container |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-2577 published |
x86 all tests passed /verified @rnetser @dshchedr Could you please give your approvals again? |
|
/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:
Your deliverable: Test Execution Plan
Guidelines:
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: Before setting "Run smoke tests: True", you MUST use shell scripts to: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 4768 🏁 Script executed: Length of output: 1743 🧠 Learnings used |
ensure cpu feature vmx is disabled for cpu hotplug tests only for x86_64 Signed-off-by: chandramerla <Chandra.Merla@ibm.com>
|
change - addressed the review comment to change order of conditions in a if block |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@tests/virt/node/migration_and_maintenance/test_vm_disk_load_with_migration.py`:
- Around line 23-26: When the s390x special-case sets
request.param["cpu_threads"] = 1, add an INFO-level log entry to record this
configuration change; update the block guarded by is_s390x_cluster to call the
test logger (or module logger) with a structured message including keys like
"action":"override_cpu_threads", "arch":"s390x", "old_value":<previous value
from request.param.get("cpu_threads")>, and "new_value":1 so the change is
traceable; modify the same function/block that references is_s390x_cluster and
request.param["cpu_threads"] to read the prior value, perform the override, then
emit the structured info log.
♻️ Duplicate comments (4)
utilities/cpu.py (1)
125-127: MEDIUM: Use structured logging for the common CPU model.Structured logs are searchable and required by repo conventions; f-strings hide fields from log queries.
As per coding guidelines, structured key-value logging is required.♻️ Proposed fix
- LOGGER.info(f"Common CPU used is {common_cpu_model}") + LOGGER.info("Common CPU selected", extra={"common_cpu_model": common_cpu_model})utilities/constants.py (1)
848-883: MEDIUM: Remove the# noqasuppression and wrap the URL comment.
Linter suppressions are forbidden because they hide real lint failures and make pre-commit checks inconsistent. Split the long URL or shorten it so no suppression is needed.🧹 Suggested fix
- # Ref: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/automatically_installing_rhel/preparing-a-rhel-installation-on-64-bit-ibm-z_rhel-installer#planning-for-installation-on-ibm-z_preparing-a-rhel-installation-on-64-bit-ibm-z # noqa: E501 + # Ref: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/ + # automatically_installing_rhel/preparing-a-rhel-installation-on-64-bit-ibm-z_rhel-installerAs per coding guidelines, linter suppressions must not be added.
tests/install_upgrade_operators/must_gather/test_must_gather_vms.py (1)
46-54: HIGH: Guard missingarchitectureConfigurationto avoid KeyError.
Direct indexing can crash on older must‑gather data; please use guarded access and fail with a clear message.✅ Proposed fix
- kubevirt_architecture_config = kubevirt_resource_scope_session.instance.to_dict()["spec"]["configuration"][ - "architectureConfiguration" - ][nodes_cpu_architecture] + architecture_configuration = ( + kubevirt_resource_scope_session.instance.to_dict() + .get("spec", {}) + .get("configuration", {}) + .get("architectureConfiguration", {}) + ) + kubevirt_architecture_config = architecture_configuration.get(nodes_cpu_architecture) + if kubevirt_architecture_config is None: + raise AssertionError( + "Missing architectureConfiguration for current architecture.", + {"architecture": nodes_cpu_architecture, "available": list(architecture_configuration)}, + )tests/virt/node/general/test_machinetype.py (1)
53-70: HIGH: VM name includes dots → invalid DNS‑1123 label.
Machine type strings likepc-q35-rhel7.6.0will generate invalid resource names.✅ Proposed fix
def vm_with_explicit_machine_type(unprivileged_client, namespace, explicit_machine_type): - name = f"vm-machine-type-{explicit_machine_type}" + safe_machine_type = explicit_machine_type.replace(".", "-") + name = f"vm-machine-type-{safe_machine_type}"
|
/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:
Your deliverable: Test Execution Plan
Guidelines:
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: Before setting "Run smoke tests: True", you MUST use shell scripts to: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 4854 🏁 Script executed: Length of output: 1728 🧠 Learnings used |
|
/approve |
|
Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-2577. |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:latest published |
Short description:
Updated Node Tier2 tests after adopting to work for s390x
More details:
Earlier I've created a PR, which I couldn't finish due to other release priorities. So, I've addressed all the review comments there in this PR.
What this PR does / why we need it:
To run node tier2 tests in s390x in the pipeline
Which issue(s) this PR fixes:
Special notes for reviewer:
@rnetser @vsibirsk
jira-ticket:
NONE
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.