Skip to content

Fix deployment issue seen in verify_hv_kvp_daemon_installed #4406

Open
LiliDeng wants to merge 1 commit intomainfrom
lilideng/fix_4_3_001
Open

Fix deployment issue seen in verify_hv_kvp_daemon_installed #4406
LiliDeng wants to merge 1 commit intomainfrom
lilideng/fix_4_3_001

Conversation

@LiliDeng
Copy link
Copy Markdown
Collaborator

@LiliDeng LiliDeng commented Apr 3, 2026

Description

When run verify_hv_kvp_daemon_installed with size Standard_E20bds_v6 encounter below issue:

AzureImageStandard.verify_hv_kvp_daemon_installed: FAILED deployment failed. AssertionError: actual: <class 'lisa.sut_orchestrator.azure.features.SecurityProfileSettings'>
2026-04-03 03:08:46.615[3504][INFO] lisa.RootRunner test result summary

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:

Tested Azure Marketplace Images:
debian debian-13 13-gen2 0.20260112.2355

Test Results

Image VM Size Result
debian debian-13 13-gen2 0.20260112.2355 verify_hv_kvp_daemon_installed PASSED

@LiliDeng LiliDeng requested review from Copilot and kamalca April 3, 2026 03:11
…strator.azure.features.SecurityProfileSettings'>
@LiliDeng LiliDeng force-pushed the lilideng/fix_4_3_001 branch from 70b23e5 to ea7d0cd Compare April 3, 2026 03:12
@LiliDeng LiliDeng changed the title test Fix deployment issue seen in verify_hv_kvp_daemon_installed Apr 3, 2026
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

This PR fixes an assertion failure during feature/settings equality checks by making VirtualizationSettings.__eq__ safely handle comparisons against non-VirtualizationSettings objects (returning non-equal instead of raising).

Changes:

  • Replace a type-assert in VirtualizationSettings.__eq__ with a safe type check to avoid raising AssertionError during comparisons.

Comment thread lisa/schema.py
Comment on lines 893 to 896
def __eq__(self, o: object) -> bool:
assert isinstance(o, VirtualizationSettings), f"actual: {type(o)}"
if not isinstance(o, VirtualizationSettings):
return False
return super().__eq__(o) and self.host_type == o.host_type
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

In eq, returning False for an unrelated type works, but Python’s comparison protocol recommends returning NotImplemented when the other operand isn’t the expected type. This lets Python fall back to the other operand’s eq and keeps equality symmetric (especially if subclasses or proxy types are involved).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants