Skip to content

[AI Generated] test(custom_script): mark boot validation test maturity as preview#4606

Open
LiliDeng wants to merge 2 commits into
mainfrom
feature/customscript-boot-maturity-experimental
Open

[AI Generated] test(custom_script): mark boot validation test maturity as preview#4606
LiliDeng wants to merge 2 commits into
mainfrom
feature/customscript-boot-maturity-experimental

Conversation

@LiliDeng

@LiliDeng LiliDeng commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Set the maturity of microsoft_azure_extensions_customscript_boot_validation_test to preview in its @TestCaseMetadata. Same-repo branch so the internal Github PR Validation pipeline triggers.

Copilot AI review requested due to automatic review settings July 17, 2026 06:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the Custom Script VM extension boot validation test’s metadata to classify it as experimental, so it won’t be included in default (stable-only) test selection unless explicitly requested.

Changes:

  • Set maturity="experimental" on microsoft_azure_extensions_customscript_boot_validation_test via @TestCaseMetadata.

@LiliDeng

Copy link
Copy Markdown
Collaborator Author

AI Test Case Selection

Selected 13 test case(s): microsoft_azure_extensions_customscript_boot_validation_test,verify_public_script_run,verify_second_public_script_run,verify_script_in_both_settings_failed,verify_public_script_protected_settings_run,verify_public_script_without_command_run,verify_base64_script_with_command_run,verify_public_script_with_base64_script_run,verify_public_script_with_gzip_base64_script_run,verify_private_script_without_sas_run_failed,verify_private_script_with_storage_credentials_run,verify_private_sas_script_run,verify_public_python_script_run

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

Result: Failed

View full logs in Azure DevOps

@johnsongeorge-w

Copy link
Copy Markdown
Collaborator

@copilot update this pr to change the maturity to preview

Copilot AI review requested due to automatic review settings July 17, 2026 16:45

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@copilot update this pr to change the maturity to preview

Updated in commit 57b9393: maturity for microsoft_azure_extensions_customscript_boot_validation_test is now set to preview.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 1 out of 1 changed files in this pull request and generated 1 comment.

@LiliDeng

Copy link
Copy Markdown
Collaborator Author

AI Test Case Selection

Selected 13 test case(s): microsoft_azure_extensions_customscript_boot_validation_test,verify_public_script_run,verify_second_public_script_run,verify_script_in_both_settings_failed,verify_public_script_protected_settings_run,verify_public_script_without_command_run,verify_base64_script_with_command_run,verify_public_script_with_base64_script_run,verify_public_script_with_gzip_base64_script_run,verify_private_script_without_sas_run_failed,verify_private_script_with_storage_credentials_run,verify_private_sas_script_run,verify_public_python_script_run

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

Result: Failed

View full logs in Azure DevOps

@LiliDeng LiliDeng changed the title [AI Generated] test(custom_script): mark boot validation test maturity as experimental [AI Generated] test(custom_script): mark boot validation test maturity as preview Jul 20, 2026
tarunsingh-msft added a commit to tarunsingh-msft/lisa that referenced this pull request Jul 20, 2026
… maturity

Set maturity="preview" on the RCv1/RCv2 boot validation test cases so they are
excluded from default (stable-only) runs until fully validated, consistent with
the CustomScript boot validation test (microsoft#4606) and the test maturity model (microsoft#4586).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f
tarunsingh-msft added a commit to tarunsingh-msft/lisa that referenced this pull request Jul 20, 2026
…review

Address review feedback on the RunCommand boot validation tests:

- Coerce runbook variables to str before strip(), so a non-string YAML value
  (e.g. extension_version: 1.3 parsed as a float) does not crash the helper.
- Use the normalized Major.Minor value from normalize_type_handler_version()
  for type_handler_version, so a Major.Minor.Patch runbook value installs
  correctly instead of being passed through raw.
- Set maturity="preview" on both boot validation cases so they are excluded
  from default stable-only runs until fully validated, consistent with the
  CustomScript boot validation test (microsoft#4606) and the test maturity model (microsoft#4586).

Re-validated on real Azure VMs after these changes: both cases PASSED
(v1 centralus, v2 eastus2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f
LiliDeng pushed a commit that referenced this pull request Jul 20, 2026
…4599)

* test(vm_extensions): add RunCommand v1/v2 boot validation test cases

Adds minimal, self-contained boot validation test cases for the Run Command v1 and v2 VM extensions, mirroring the CustomScript boot validation test (PR #4580).

- RunCommandV1Tests.microsoft_azure_extensions_runcommandv1_boot_validation_test
- RunCommandV2Tests.microsoft_azure_extensions_runcommandv2_boot_validation_test

Each installs the extension with a single inline command and no file/script uris (no storage account or public blob access needed), asserts provisioning_state == Succeeded, then removes the extension. Publisher/type/version are read from runbook variables; the test is skipped when extension_version is unset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* style(vm_extensions): fix Black formatting in run_commandv1

Collapse the extension_type assignment onto a single line to satisfy the Black formatter (BLK100), matching the flake8 CI check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* docs(vm_extensions): clarify extension_version is required in boot validation tests

Reword the RCv1/RCv2 boot validation docstrings so the version handling matches the implementation: publisher and type default to the Run Command extension, while extension_version must be supplied via the runbook (the test is skipped otherwise). Addresses PR review feedback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* test(vm_extensions): rename boot validation tests to match RunCommand publisher/type

The certification functional-validation feature parses the test method name using the pattern <Publisher>_<Type>_boot_validation_test. RunCommand is published under Microsoft.CPlat.Core (types RunCommandLinux / RunCommandHandlerLinux), so the method names now reflect the actual publisher/type instead of the CustomScript publisher prefix:

- microsoft_azure_extensions_runcommandv1_boot_validation_test -> microsoft_cplat_core_runcommandlinux_boot_validation_test
- microsoft_azure_extensions_runcommandv2_boot_validation_test -> microsoft_cplat_core_runcommandhandlerlinux_boot_validation_test

Publisher/type are unchanged in code (Microsoft.CPlat.Core, since 2023 PRs #2809/#2778) and match the deployed extension instance name. Re-validated on real Azure VMs: both cases PASSED.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* refactor(vm_extensions): extract shared boot validation helper

Consolidate the duplicated RunCommand v1/v2 boot validation flow into a single reusable helper run_extension_boot_validation() in common.py, as suggested in review. The helper reads publisher/type from runbook variables (with caller-provided defaults), requires extension_version (skips otherwise), installs the extension, asserts provisioning succeeds, and optionally deletes it (cleanup=False for CRP-managed RunCommand v2). A protected_settings parameter is included so future extensions can reuse it.

Both cases re-validated on real Azure VMs after the refactor: PASSED (v1 eastus2, v2 eastus).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* test(vm_extensions): skip boot validation on malformed extension_version

Add a guard in run_extension_boot_validation that validates extension_version is a 'Major.Minor' or 'Major.Minor.Patch' value (reusing AzureExtension.normalize_type_handler_version) and raises SkippedException instead of failing with a confusing Azure error when it is malformed. Addresses review feedback on version validation.

Validated on Azure: valid versions (1.0/1.3) PASSED; malformed versions (1.0.beta / abc) SKIPPED with a clear message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* docs(vm_extensions): capitalize URIs in boot validation docstrings

Address review nit: 'uris' -> 'URIs' in the RCv1/RCv2 boot validation test descriptions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* test(vm_extensions): harden version handling and mark boot tests as preview

Address review feedback on the RunCommand boot validation tests:

- Coerce runbook variables to str before strip(), so a non-string YAML value
  (e.g. extension_version: 1.3 parsed as a float) does not crash the helper.
- Use the normalized Major.Minor value from normalize_type_handler_version()
  for type_handler_version, so a Major.Minor.Patch runbook value installs
  correctly instead of being passed through raw.
- Set maturity="preview" on both boot validation cases so they are excluded
  from default stable-only runs until fully validated, consistent with the
  CustomScript boot validation test (#4606) and the test maturity model (#4586).

Re-validated on real Azure VMs after these changes: both cases PASSED
(v1 centralus, v2 eastus2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

* refactor(vm_extensions): drop unused protected_settings from boot helper

Address review feedback (LiliDeng): the boot validation callers never pass
protected_settings, so remove the unused parameter from
run_extension_boot_validation(). It can be reintroduced if a future extension
actually needs protected settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3c8bcd2c-8f65-4576-a13b-870fb7163f0f

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

4 participants