Repository navigation
[AI Generated] Fix inverted requirement in setspace mismatch skip messages - #4761
SrikanthMyakam (SRIKKANTH) wants to merge 2 commits into
Conversation
check_setspace treats requirements as "any of these items" and ignores
is_allow_set. Its skip reason, however, used SetSpace.__repr__, which
prints any set with is_allow_set=False as "not(...)". Merged requirements
from intersect_setspace_by_priority, and the schema's default sets, have
is_allow_set=False. As a result, skip messages stated the opposite of the
real requirement.
The reason now lists the items that were actually checked. Matching
behavior is unchanged. When several locations report the same reason,
the Azure platform now shows it once.
Examples:
Before: Requirement mismatch: data_path: requires [not(Sriov)] but VM
supports [Synthetic]; Requirement mismatch: data_path: requires
[not(Sriov)] but VM supports [Synthetic]
After: Requirement mismatch: data_path: requires [Sriov] but VM
supports [Synthetic]
Before: Requirement mismatch: disk_controller_type: requires [not(NVMe)]
but VM supports [SCSI]
After: Requirement mismatch: disk_controller_type: requires [NVMe] but
VM supports [SCSI]
This affects SRIOV tests (e.g. verify_sriov_basic,
verify_sriov_provision_with_max_nics, verify_hibernation_sriov_network,
verify_nvme_sriov_rescind) and verify_nvme_disk_controller_type.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The logic is narrowly scoped and correct; only minor test and traceability follow-ups remain.
2 open findings
What changed in this PR
Fixes inverted SetSpace requirement messages and removes duplicate Azure location errors.
Changes:
- Formats checked set items without misleading
not(...). - Deduplicates identical Azure deployment errors.
- Adds regression coverage for requirement formatting.
| File | Description |
|---|---|
lisa/search_space.py |
Corrects set-space mismatch formatting. |
lisa/sut_orchestrator/azure/platform_.py |
Deduplicates location errors. |
selftests/test_search_space.py |
Tests corrected mismatch reasons. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
AI Test Case SelectionSelected 1 test case(s): smoke_test Marketplace image: Result: Succeeded |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The message-only fixes match existing evaluation behavior and have focused regression coverage.
Key Test Cases:
verify_sriov_basic|verify_nvme_disk_controller_type
Impacted LISA Features:
NetworkInterface, Disk, Nvme
Tested Azure Marketplace Images:
- canonical ubuntu-24_04-lts server latest
0 open findings
2 resolved since last review
🧠 Review effort: Balanced
AI Test Case SelectionSelected 1 test case(s): smoke_test Marketplace image: Result: Succeeded |

Description
Fixes misleading deployment skip messages that state the opposite of the real requirement. Example:
requires [not(Sriov)] but VM supports [Synthetic]when the test actually requires Sriov.Root cause:
check_setspacetreats a requirement as "any of these items" and ignoresis_allow_set. Its reason text, however, usedSetSpace.__repr__, which prints anyis_allow_set=Falseset asnot(...). Merged requirements fromintersect_setspace_by_priority(SetSpace[T]()) and the schema's default sets both haveis_allow_set=False. For example,Sriov()merged with the default{Synthetic, Sriov}becomes{Sriov}, which was printed asnot(Sriov).Changes:
lisa/search_space.py:check_setspacenow lists the items it actually checked. Matching behavior is unchanged, so no skip or pass decision changes.lisa/sut_orchestrator/azure/platform_.py: when several locations (e.g. westus2 and westus3) report the same reason, it is shown once.selftests/test_search_space.py: regression test covering a default-flag set, plain enum values, and the Sriov merge path.Before / After:
Requirement mismatch: data_path: requires [not(Sriov)] but VM supports [Synthetic]; Requirement mismatch: data_path: requires [not(Sriov)] but VM supports [Synthetic]Requirement mismatch: data_path: requires [Sriov] but VM supports [Synthetic]Requirement mismatch: disk_controller_type: requires [not(NVMe)] but VM supports [SCSI]Requirement mismatch: disk_controller_type: requires [NVMe] but VM supports [SCSI]Affected tests include
verify_sriov_*,stress_sriov_*,verify_hibernation_sriov_network*,verify_nvme_sriov_rescind,verify_xdp_*,stress_hibernationandverify_nvme_disk_controller_type.intersect_setspace_by_priorityis intentionally not changed to return an allow-set. That would change howSetSpace.check()evaluates the merged set, so it is out of scope for this message-only fix.Related Issue
N/A - reported directly in this pull request.
Type of Change
Checklist
Test Validation
Key Test Cases:
verify_sriov_basic|verify_sriov_provision_with_max_nics|verify_hibernation_sriov_network|verify_nvme_sriov_rescind|verify_nvme_disk_controller_type|smoke_test
Impacted LISA Features:
NetworkInterface, Sriov, Synthetic, Disk, Nvme, Hibernation
Tested Azure Marketplace Images:
Test Results
python -m unittest selftests.test_search_space selftests.runners.test_lisa_runner: PASSED (31 tests)intersect_setspace_by_priority(Sriov, {Synthetic, Sriov})checked against[Synthetic]now givesdata_path: requires [Sriov] but VM supports [Synthetic]: PASSEDLint: isort clean. mypy shows no new errors; 2 errors in
test_countspace_check_rejection_reasonsalready exist on main.