Skip to content

Add lisa runbook generator prompt, reduce the size of test writer prompt#4476

Open
paxue wants to merge 5 commits into
mainfrom
paxue/add_yaml_generator
Open

Add lisa runbook generator prompt, reduce the size of test writer prompt#4476
paxue wants to merge 5 commits into
mainfrom
paxue/add_yaml_generator

Conversation

@paxue
Copy link
Copy Markdown
Collaborator

@paxue paxue commented May 12, 2026

Description

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:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

Copilot AI review requested due to automatic review settings May 12, 2026 04:48
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

Adds a new GitHub prompt for generating LISA runbook YAML and trims the existing LISA test-writer prompt to be shorter while keeping core guidance.

Changes:

  • Reduced .github/prompts/lisa_test_writer.prompt.md from a long guide to a condensed checklist + skeleton.
  • Added .github/prompts/lisa_runbook_generator.prompt.md with runbook structure, platform/testcase examples, and common scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
.github/prompts/lisa_test_writer.prompt.md Condenses test-writing guidance and keeps a short example skeleton.
.github/prompts/lisa_runbook_generator.prompt.md Introduces a runbook-YAML generator prompt with examples and rules.

Comment thread .github/prompts/lisa_test_writer.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
Comment thread .github/prompts/lisa_runbook_generator.prompt.md Outdated
reduce the lisa_test_writer prompt file
@paxue paxue force-pushed the paxue/add_yaml_generator branch from 1c7e981 to d699c67 Compare May 12, 2026 17:33
1. **What tests?** (specific test name, area, smoke, tier — or passed via CLI variable)
2. **What platform?** (azure, ready, qemu, openvmm)
3. **What images?** (see Image Formats below)
4. **Special requirements?** (security profile, WSL, purchase plan, disk/NIC)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add the questions about azure auth

**VHD** — custom OS disk from a storage blob URL:
```yaml
vhd:
vhd_path: "https://mystorageaccount.blob.core.windows.net/vhds/my-image.vhd"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

need specify the vhd generation and architecture, also need to mention when use arm64 vhd, either use shared gallery image or use gallery image transformer.

Comment thread .github/prompts/lisa_runbook_generator.prompt.md
platform:
- type: azure
admin_username: $(admin_username)
admin_password: $(admin_password)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

encourage to use admin_private_key_file or leave it empty, lisa will generate the key pairs during runtime.

| Azure Linux 3 | `microsoftcblmariner azure-linux-3 azure-linux-3 latest` |
| Debian 12 Gen2 | `debian debian-12 12-gen2 latest` |
| SLES 15 SP6 Gen2 | `suse sles-15-sp6 gen2 latest` |
| Windows Server 2022 Gen2 | `MicrosoftWindowsServer WindowsServer 2022-datacenter-g2 latest` |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

when use windows image, is_linux needs to be set as false

Copy link
Copy Markdown
Collaborator Author

@paxue paxue May 28, 2026

Choose a reason for hiding this comment

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

Windows Server 2022 Gen2 image is major used for WSL, not for windows test.
In \lisa\lisa\sut_orchestrator\azure\platform_.py, there is logic to fill the is_linux auto from Marketplace image:

# retrieve the os type for arm template.
if (
image_info
and image_info.os_disk_image
and image_info.os_disk_image.operating_system == "Windows"
):
# TODO: Move this to an AzureImageSchema property
azure_node_runbook.is_linux = False

|---------|---------|
| `name` | Descriptive run name |
| `include` | Inherit from other YAML files: `- path: ./azure.yml` |
| `extension` | Extra test module paths: `- "../testsuites"` |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This needs to be expanded, when I use the prompt, it doesn't generate the section.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

path fixed

| `name` | Descriptive run name |
| `include` | Inherit from other YAML files: `- path: ./azure.yml` |
| `extension` | Extra test module paths: `- "../testsuites"` |
| `variable` | Parameters with `$(name)` substitution. Supports `is_secret: true`, `file: ./secrets.yml` |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

need to add is_case_visible

Copilot AI review requested due to automatic review settings May 22, 2026 02:02
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.

Copilot wasn't able to review any files in this pull request.

Copilot AI review requested due to automatic review settings May 28, 2026 04:56
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +60 to +65
> shared_image_gallery:
> subscription_id: "$(subscription_id)"
> resource_group_name: "my-rg"
> image_gallery: "myGallery"
> image_definition: "myArm64ImageDef" # definition must have architecture=Arm64
> image_version: "latest"
Comment on lines +84 to +88
> Then reference `$(shared_gallery)` in the platform `shared_image_gallery` field.

**Shared Image Gallery (SIG)** — image from Azure Compute Gallery:
```yaml
shared_image_gallery:
vhd:
vhd_path: "https://mystorageaccount.blob.core.windows.net/vhds/my-image.vhd"
hyperv_generation: 2 # 1 or 2; required for correct VM generation selection
architecture: x64 # x64 or Arm64
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we can only use x64 when use vhd format

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.

3 participants