Skip to content

[AI Generated] Fix Azure VM size mismatch skip reason message#4418

Closed
LiliDeng wants to merge 1 commit intomainfrom
fix/azure-vm-size-skip-reason
Closed

[AI Generated] Fix Azure VM size mismatch skip reason message#4418
LiliDeng wants to merge 1 commit intomainfrom
fix/azure-vm-size-skip-reason

Conversation

@LiliDeng
Copy link
Copy Markdown
Collaborator

Problem

When a test is run with a specific VM size that is incompatible with the requested image (e.g., x86-only Standard_HC44-16rs with an Arm64 Ubuntu image), LISA showed a misleading skip reason:

"Test skipped on 'westus3' for an unknown reason. This could be due to insufficient quota..."

Root Cause

In _get_allowed_capabilities(), when not allowed_capabilities and a specific vm_size was set, the error was a generic "no vm size found..." message. Then in _get_azure_capabilities(), the else: branch unconditionally overwrote any specific error set earlier with the generic "unknown reason" fallback.

Fix

  1. _get_allowed_capabilities(): When not allowed_capabilities and node_runbook.vm_size is explicitly set, emit a clear message: "Requirement mismatch: requested VM size '<size>' is unavailable in '<location>' or incompatible with current test requirements."

  2. _get_azure_capabilities(): Changed else:elif not error: so the generic "unknown reason" fallback only fires when no specific error was already populated.

Validation

Repro with Standard_HC44-16rs + 22_04-lts-arm64 image in westus3 now shows:

"Requirement mismatch: requested VM size 'Standard_HC44-16rs' is unavailable in 'westus3' or incompatible with current test requirements."

Copilot AI review requested due to automatic review settings April 16, 2026 07:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the Azure platform capability-selection skip messaging so that VM size/image requirement mismatches report a specific, actionable reason instead of being overwritten by a generic “unknown reason” message.

Changes:

  • Preserve previously computed skip reasons in _get_azure_capabilities() by only using the generic fallback when no specific error was set.
  • Emit a clearer “Requirement mismatch” message in _get_allowed_capabilities() when a user explicitly requests a VM size but no capabilities are found.

error = (
"Requirement mismatch: requested VM size "
f"'{node_runbook.vm_size}' is unavailable in '{location}' "
"or incompatible with current test requirements."
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an explicit remediation hint to this skip reason (e.g., verify the VM size is offered in the region and supports the requested image architecture/requirements, or choose a different size/location) so it’s immediately actionable for users.

Suggested change
"or incompatible with current test requirements."
"or incompatible with current test requirements. Verify that "
"the VM size is offered in this region and supports the "
"requested image architecture and other requirements, or "
"choose a different VM size or location."

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 39.747

@LiliDeng LiliDeng changed the title Fix Azure VM size mismatch skip reason message [AI Generated] Fix Azure VM size mismatch skip reason message Apr 16, 2026
@LiliDeng
Copy link
Copy Markdown
Collaborator Author

Just for testing purpose.

@LiliDeng LiliDeng closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants